Skip to content

Refresh the access token

POST
/auth/refresh
curl --request POST \
--url https://localhost:3000/api/v1/auth/refresh \
--header 'Content-Type: application/json' \
--data '{ "refresh_token": "a1b2c3d4e5f6g7h8i9j0..." }'

Exchanges a refresh token for new tokens. Replaying the previous refresh token within the grace window (refresh_reuse_grace) only returns an access token, without refresh_token or cookie

Refresh token

Media typeapplication/json
object
refresh_token
required
string

Example

a1b2c3d4e5f6g7h8i9j0...

Tokens refreshed

Media typeapplication/json
object
access_token
required
string
expires_in
required
integer
refresh_token
string

Example

{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 900,
"refresh_token": "a1b2c3d4e5f6g7h8i9j0..."
}

Invalid request

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Invalid or expired refresh token

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Erreur interne

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}