Refresh Token API
Overview
The Refresh Token API generates a new access token and refresh token using a valid refresh token issued during authentication.
Access tokens typically expire after a short period for security reasons. When this happens, the refresh token can be used to obtain a new access token without requiring the user to log in again.
The API performs the following actions:
- Validates the provided refresh token
- Checks whether the token is expired
- Issues a new access token
- Issues a new refresh token
Note
Refresh tokens are long-lived tokens used only for generating new access tokens. They should be stored securely and never exposed publicly!
Endpoint
This endpoint allows you to:
- Renew an expired access token
- Maintain authenticated sessions
- Avoid repeated login requests
Authentication
This endpoint does not require a bearer token, since it is used to generate a new token.
However, the request must include a valid refresh token.
Content-Type: application/json
Request Body
The Delete Shipment API expects a JSON payload containing a list of shipment references to be deleted.
Note
The schema tree below is automatically generated from the OpenAPI specification!
Loading schema…
Note
The example below is automatically generated from the OpenAPI specification!
Sample Request
Show Example Request
{
"refreshToken": "aaaassw23242455555555555555555444464646"
}
Responses
| Code | Description |
|---|---|
| 200 | Success – new tokens issued |
| 401 | Unauthorized – Refresh token expired or invalid |
| 500 | Internal Server Error |
Examples
200 Success – new tokens issued
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.....",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.......",
"expiresIn": 3600,
"tokenType": "Bearer"
}
Field Description
| Field | Type | Description |
|---|---|---|
| accessToken | string | Newly generated JWT access token |
| refreshToken | string | Newly issued refresh token |
| expiresIn | number | Token expiration time in seconds |
| tokenType | string | Authentication scheme used |
401 Unauthorized – Refresh Token Expired
{
"code": "401",
"response": "RefreshToken Expired"
}
| Field | Type | Description |
|---|---|---|
| code | string | HTTP status code |
| response | string | Error message describing why the request failed |
Important Notes
- Refresh tokens expire after a configured time period.
- If the refresh token is expired, you must authenticate again.
- Refresh tokens should always be stored securely.