How do the API tokens work?

Learn about our refresh tokens, access tokens, and how to use them.

Jay Hung avatar
Written by Jay Hung
Updated over a week ago

It is important to distinguish between the two different types of tokens that are used with our API authentication: refresh tokens and access tokens.

Refresh Token

When your API subscription begins, you are issued a single refresh token which is directly associated with your API subscription account, and does not expire. This refresh token will not change for the duration of your API subscription, unless someone from Chartmetric assigns you a new refresh token (this generally does not occur unless you are switching plans or somehow the token is not working for you.

Access Tokens

You may use your refresh token to authenticate with our API, and receive an unlimited number of access tokens. These access tokens will then need to be passed with each API request you make.

The access tokens are short-lived and do expire, and when it does you will need to obtain a new access token. It is highly-recommended that your code is smart enough to detect when your access token has expired, and automatically request a new one, otherwise you may receive errors for your API requests.

See our official API documentation for more info.

Did this answer your question?