Refresh a JWT token, resulting in a new JWT token to be used by subsequent requests
Authentication
POST/api/v1/refresh
Send two credentials: your own, and the customer's.
How authentication works- Yours
Authorization: Bearer- The customer's
User-Authorization: Bearer
Language
Environment
Credentials
Your credential
The customer's credential
Choose an environment first.
curl -X POST https://api.btcdirect.eu/api/v1/refresh \ -H "Authorization: Bearer $BTCD_PARTNER_TOKEN" \ -H "User-Authorization: Bearer $BTCD_USER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "refreshToken": "ab6f6e74935129101a04882fb39be0c0440f9d4df271fa7654a0f99f847b9e0871db61bb515cb8ef5c11f7c298551f9a59107ec0ffb34f06eeab9f99272385cd" }'Response
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}Request
refreshTokenstring
Refresh token.
Exampleab6f6e74935129101a04882fb39be0c0440f9d4df271fa7654a0f99f847b9e0871db61bb515cb8ef5c11f7c298551f9a59107ec0ffb34f06eeab9f99272385cd
Responses
200Token refreshed.400A list of possible errors for this endpoint.Body of the success response
tokenstring
Authentication token. Use this to request resources requiring authentication.
ExampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
refreshTokenstring
Refresh token. Use this to request a new authentication token.
ExampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Every failure answers with a message and a code. Switch on the code — messages are written for people and can change.