Skip to main content
POST
/
token
Get Access Token
curl --request POST \
  --url https://api.kraken.com/oauth/token \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=authorization_code \
  --data 'code=<string>' \
  --data 'redirect_uri=<string>' \
  --data 'refresh_token=<string>'
{
  "access_token": "2YotnFZFEjr1zCsicMWpAA",
  "token_type": "bearer",
  "expires_in": 14400,
  "refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA"
}

Documentation Index

Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

Authorization
string
required

Basic access authentication.

Format: Basic <credentials>

Where <credentials> is the base64-encoding of <client ID>:<client secret>.

For public clients, <client secret> is empty. As such, credentials would be equivalent to <client ID>:.

For confidential clients, <client secret> is the client secret that has been base64 decrypted by your RSA private key.

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required

Type of grant

Available options:
authorization_code,
refresh_token
code
string

The authorization code (If grant_type = authorization_code)

redirect_uri
string

The redirect URI used to obtain the authorization code (If grant_type = authorization_code)

refresh_token
string

The refresh token (If grant_type = refresh_token)

Response

200 - application/x-www-form-urlencoded

Success response

access_token
string

Access token to call other endpoints. Valid within 24 hours for private clients or 4 hours for public clients.

Example:

"2YotnFZFEjr1zCsicMWpAA"

token_type
enum<string>

Type of token issued

Available options:
bearer
expires_in
number

Lifetime in seconds of the access token.

Example:

14400

refresh_token
string

Used to obtain new access tokens using the same authorization grant. Valid within 30 days.

Example:

"tGzv3JOkF0XG5Qx2TlKWIA"