Access tokens are deliberately short-lived — they expire after 15 minutes — to limit the window of exposure if one is intercepted. Rather than forcing users to re-enter their credentials every quarter of an hour, clients hold onto a long-lived refresh token (valid for 30 days) and silently exchange it for a fresh access token whenever the current one expires. This endpoint, provided byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/viet2811/uk-travel-recommendation/llms.txt
Use this file to discover all available pages before exploring further.
djangorestframework-simplejwt’s TokenRefreshView, performs that exchange. The refresh token itself is not rotated by default: the same refresh token can be used repeatedly until it expires or the user’s account is deactivated. No Authorization header is required — the refresh token is the sole credential.
Endpoint
| Method | POST |
| Path | /api/user/token/refresh |
| Auth required | No |
| Content-Type | application/json |
The refresh flow
Request Body
The refresh token obtained from the Login endpoint. The token must be valid and not yet expired (30-day lifetime). A token that has been tampered with or belongs to a deactivated account will be rejected with
401.Responses
200 OK
Returned when the refresh token is valid. The response contains a new access token. The refresh token supplied in the request is not changed.A freshly issued JWT access token. Valid for another 15 minutes from the time of issue. Replace the expired token stored on the client with this new value.
200 OK
401 Unauthorized
Returned when the refresh token is invalid, expired, or malformed.401 Unauthorized
Examples
The TypeScript example above demonstrates a common pattern: an axios response interceptor that automatically retries a failed request with a refreshed access token whenever the server returns
401. This means the rest of your application code never needs to manually handle token expiry.