Authentication
Refresh a bearer token
Use an existing refresh token to obtain a new access token and refresh token without requiring the customer to re-enter their password.
Refresh a bearer token
Refresh a bearer token
Uses a refresh token to obtain a new access token and refresh token without requiring the customer to re-enter their password. This is useful when the access token has expired but you want to maintain the customer’s session.Unlike most Nexudus API endpoints, this request must be encoded as
application/x-www-form-urlencoded, not application/json. Sending a JSON
body will result in an unsupported_grant_type error.Authentication
No authentication required. This endpoint uses the refresh token itself as the credential.Request Body
Must be
refresh_token to use the refresh token grant flow.The refresh token previously received from the sign-in endpoint.
Headers
The client identifier that was used when obtaining the bearer token. If the
client_id was provided during sign-in, use that value. If client_id was omitted during sign-in, use the customer’s email address (which defaults to the client_id automatically).Response
New bearer token to include in the
Authorization header of all subsequent authenticated requests.Token scheme. Always
bearer.Lifetime of the new access token in seconds.
New refresh token to use for subsequent refresh operations. The previous refresh token is invalidated.
Examples
Successful token refresh
TypeScript Integration
Error Responses
The
grant_type field is missing or the body was not encoded as application/x-www-form-urlencoded.The refresh token is invalid, expired, or has already been used. The
error_description field contains a human-readable reason.Related Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /api/token | (this endpoint) Exchange credentials for a bearer token |
POST | /api/sys/users/token/refresh | Get a short-lived server-side JWT for authenticated links |
Refresh a bearer token