Skip to main content

Body

grant_type
string
required
Method used for obtaining a token. For password-based authentication, use “password”.
username
string
required
The email address associated with the account.
password
string
required
Password corresponding to the username provided.

Response

refresh_token
string
required
Token that can be used to obtain a new access token when the current one expires.
access_token
string
required
Token returned after successful authentication. Use this token for “Authorization” in subsequent requests.
token_type
string
Type of token. Commonly “Bearer”.
expires_in
number
Duration (in seconds) before the token expires.

Examples

cURL:

Request:
curl --location 'https://{{ BASE_URL }}/v1/auth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "grant_type": "password",
    "username": "admin@finbank.com",
    "password": "zn29032A-.tYrLuxYqw."
}'

Response:
{
  "refresh_token": "dGhpc2lzYXNhbXBsZXJlZnJlc2h0b2tlbag.283bjdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.2j21nKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQc2",
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "token_type": "Bearer",
  "expires_in": 3600
}