Generate Token

Generate Token

The generate token API endpoint is designed to issue authentication tokens necessary for engaging with Accountability's API. These tokens, integral to making further API calls, are created when you supply your username, password, and tenant ID.

For token creation, your request must include certain credentials, each serving a distinct purpose:

Grant_typeDetermines the authentication strategy. Options 'password' and 'refresh_token' are available, with 'password' set as the standard default.
UsernameShould be the email address you use to sign into the platform.
PasswordThis is the key you've generated within the Accountability system, retrievable through My settings > API Account Credentials > API Token.
Tenant IDThis is a unique identifier assigned to your account. If you need to locate your Tenant ID, please raise a support ticket within the Accountability system.
refresh_tokenThis is essential only when you opt for the 'refresh_token' grant type. It's used to acquire a new token after the first token's validity has lapsed.

It's important to note that if you are utilizing the 'refresh_token' grant type, this is the sole parameter you need to include in your request. Username, password, and tenant ID are not required in this instance. A refresh token is valid for up to 30 days, and authentication grants an access window of 3600 seconds, regardless of the grant type.

Once you provide these parameters, the token API endpoint will generate a token that can be used for subsequent API requests.

Click Try It! to start a request and see the response here!