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.

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

Note: Each JWT is valid to call open APIs for one hour. Once the JWT is expired, users have to call Refresh JWT to get the new JWT.

Refresh JWT

Refresh JWT API helps users to get a new JWT of the specified app.

Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Note: Each JWT is valid to call Refresh JWT for five hours. Once the JWT is expired, users have to call App Login to get JWT agian.

Last updated