v1

latestOpenAPI 3.0.12026-07-14217.3 KB
Authentication Service

Refresh Token

Use the refresh_token to continue a user session without requiring the user to re-enter authentication details.

This endpoint is typically used by web or mobile applications after login to keep the user signed in.

Header example:

Authorization: Bearer {refresh_token}

Refresh behavior:

  • A new access token is generated.
  • Both a new access token and a new refresh token are returned.
  • The previous refresh_token expires.

⚠️ Important: Never expose the refresh_token outside of the application. It must be stored securely and treated as highly sensitive.

post/api/auth/refresh

Response

Token refreshed successfully

access_tokenstring required

JWT access token used to access secure Clerk Tools APIs.

token_typestring required

Token type; typically 'Bearer'.

expires_ininteger required

Number of seconds until the access token expires.

refresh_tokenstring required

Refresh token used to obtain a new access token. Previous refresh_token expires when a new one is issued. Must be stored securely and never exposed outside the application. Not generated for machine-to-machine (M2M) authentication; only available for web or mobile login.

Example response

{
  "access_token": "eyJhbGciOiJFUzI1NiJ9...",
  "token_type": "Bearer",
  "expires_in": 300,
  "refresh_token": "95CCF8D8-C4D1-4471-8DE5-4B695C065163"
}