get https://api.playground.engine.get-blockchain.io/wallet/generate_token
This endpoint allows integrators to request a valid JWT that is required by the wallet/sign
endpoint. The JWT is requested from this endpoint using the API Key provided to the integrators. The token is valid for 15 minutes and can only be used once.
Signature Key
The tokens are signed with a symmetrical key using HMAC256. This key can be shared upon contacting us if you would like to generate your JWTs.
JWT Payload
{
"id": "1", //id of the user
"exp": 1712873700, //expiration time of the jwt
"jti": "testjti", //jti to prevent replay attacks
"id_type": "userId", //type of the id to identify the user. could be userId, userUuid or address
"version": 1, //version of the endpoint
"iss": "artemis", //integrator the jwt belongs to
"iat": 1712872800 //issued at
}
Field | Description |
---|---|
id | user id, the value must relate to an existing user |
id_type | type of id for the user id. values could be one of userId , userUuid , address . |
iat | issued at time in Unix timestamp seconds |
exp | expiration time in Unix timestamp seconds, should be iat + 15 minutes. |
iss | integrator slug |
jti | unique id for JWT to prevent replay attacks. also valid for 15 minutes |
version | version of the API endpoint |
Errors
Here are potential errors you might encounter:
HTTP Status Code 400 |
---|
'id' must not be empty |
'id_type' must not be empty |
id_type must be one of: userId, userUuid, address |
HTTP Status Code 401 |
---|
apikey is invalid |
HTTP Status Code 500 |
---|
internal server error |