TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation Refresh Token

Refresh Token

Exchange a refresh token at /auth/refresh-token for a new access token (7 days) and refresh token (30 days).

Access tokens have a limited lifetime. To keep calling the API without asking the user (or re-sending client credentials), exchange the refresh token for a new pair.

  • Make a POST request to /auth/refresh-token with the refresh_token you received from /auth/token.
  • The response contains a new access_token (7 days validity) and a new refresh_token (30 days validity).
  • An access token can be used to access restricted resources. A refresh token can only be used to refresh tokens.
  • The same endpoint works for user tokens and company tokens.

Request:

{
   "refresh_token": "eyJ..."
}

Response:

{
   "access_token": "eyJ...",
   "refresh_token": "eyJ..."
}
curl -X POST https://api.staging.v2.tnid.com/auth/refresh-token \
  -H "Content-Type: application/json" \
  -d '{"refresh_token":"<refresh_token>"}'