Login
Rainbow-APIs is based on JWT. In order to use the open APIs, login APIs provide us entries to get the JWT.
Login actions
Login actions provide users the entries to call the open APIs including Metadata, Mints, Contract, Files.
App Login
APP login
API helps users to get the JWT according to app_id
and app_secret
. JWT can be used to access other open APIs.
Login the app to get the JWT according to the app_id and app_secret
Body
app_idstringRequired
app_secretstringRequired
Responses
200
auth token
application/json
401
Unauthorized
application/json
post
POST /v1/login HTTP/1.1
Host: api.nftrainbow.cn
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"app_id": "text",
"app_secret": "text"
}
{
"expire": "text",
"token": "text"
}
Name
Meaning
Param Type
Data Type
Required
app_id
The id of the app
body
string
app_secret
The secret of the app
body
string
Refresh JWT
Refresh JWT
API helps users to get a new JWT of the specified app.
Obtain a new JWT
Header parameters
AuthorizationstringRequired
Bearer openapi_token
Responses
200
refreshed auth token
application/json
401
Unauthorized
application/json
get
GET /v1/refresh_token HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
"expire": "text",
"token": "text"
}
Name
Meaning
Param Type
Data Type
Authorization
Bearer Token
Header
string
Last updated