Refresh an access token
Regenerates a Call AI access token from a refresh token, without creating a new authorization code.
Prerequisites
- Authentication: Client credentials and the authentication base URL from Mindtickle Support.
- Generate an access token: The refresh token returned with the access token.
Endpoint
Section titled “Endpoint”POST /tokenBase URL: the authentication base URL Mindtickle Support provides for issuing tokens.
Headers: Content-Type: application/json.
Request
Section titled “Request”| Parameter | Type | Required | Description |
|---|---|---|---|
client_id |
string | Not specified | Your unique client identifier. |
client_secret |
string | Not specified | Your client secret. |
grant_type |
string | Required | Must be set to refresh_token for this step. |
refresh_token |
string | Required | The refresh token returned when the access token was generated. |
Request example
Section titled “Request example”{ "client_id": "CLIENT_ID", "client_secret": "CLIENT_SECRET", "grant_type": "refresh_token", "refresh_token": "REFRESH_TOKEN"}Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
status |
number | Status code in the response body. Check the HTTP status separately. |
access_token |
string | The bearer token to send with Call AI requests. |
refresh_token |
string | The token used to regenerate an access token. |
token_type |
string | The token type, Bearer. |
expires_in |
Not specified | Time until the access token expires. Confirm the value type and unit with Mindtickle Support before using this field to schedule token renewal. |
Response example
Section titled “Response example”Token values and EXPIRES_IN are placeholders. Do not infer the type or unit of expires_in from this example.
{ "status": 200, "access_token": "ACCESS_TOKEN", "refresh_token": "REFRESH_TOKEN", "token_type": "Bearer", "expires_in": "EXPIRES_IN"}- Limits: The new
access_tokenis valid for 1 day. You can repeat this call indefinitely while your refresh token is valid. - Expiration behavior: If the
refresh_tokenitself expires, the call returns a 401Refresh token expirederror. Restart the flow from Get an authorization code.