Public API v1 → Refresh Token Endpoint

About the /tokens/refresh endpoint

Once your access token expires you will need to use the /tokens/refresh endpoint to request new tokens. The /tokens/refresh endpoint is accessed with a POST request. When you request tokens from the /tokens/refresh endpoint, the prior access token and refresh token will be invalidated. If both the access token and refresh token have expired before your next /tokens/refresh request, you will need to request tokens from the /tokens endpoint.

For information about how to get started with Public API v1, refer to References → Public API v1.

For information about how to create an access token, refer to Public API v1 → Create Token Endpoint.

Note

You must use the HTTPS scheme to be able to successfully run the API endpoints.

Important

Access tokens have a ten minute expiration and refresh tokens have a thirty minute expiration.

Request URL

Following is the URL to call the /tokens/refresh endpoint.

https://<cluster_URL>/incorta/api/v1/tokens/refresh

Request body

Following is a JSON template of a /tokens/refresh endpoint request:

{
"accessToken": "string",
"refreshToken": "string"
}

accessToken: String value of the access token provided in /tokens endpoint.

refreshToken: String value of the refresh token provided in the /tokens endpoint.

Endpoint response

The /tokens/refresh endpoint has three possible response codes and payloads.

CodeDescriptionPayload Response
201CreatedSee Token refresh: 201 Response
401Unauthorized{"message": "string"}
500Internal Server Error{"message": "string"}

Endpoint 201 response

{
"accessToken": "string",
"refreshToken": "string",
"type": "string",
"accessTokenExpiresAt": number,
"refreshTokenExpiresAt": number
}
Note

The expire values are in unix epoch time in milliseconds.