Endpoint used for obtaining a new access token using the current valid token before it expires. This allows maintaining user session without requiring re-authentication.
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/auth/refresh |
| Content-Type | application/json |
| Authentication | Bearer Token |
| Code | Description |
|---|---|
| 200 | Success - Token refreshed |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or expired token |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
{
"data": {
"accessToken": "lQ7apV0tiH3OP7hKrLqBhWkAmKArdmkFJJLGoerQ",
"tokenType": "Bearer",
"expireDate": 1763639209689,
"remainingTime": 899999
},
"meta": {
"executionTime": 1,
"generatedAt": 1763638309690
},
"message": "Your token has been restored"
}
| Parameter | Type | Description |
|---|---|---|
data.accessToken |
string | New JWT access token |
data.tokenType |
string | Token type (always "Bearer") |
data.expireDate |
integer | Token expiration date (Unix timestamp in ms) |
data.remainingTime |
integer | Token validity time remaining in milliseconds |
meta.executionTime |
integer | Request processing time in milliseconds |
meta.generatedAt |
integer | Response generation timestamp (Unix timestamp in ms) |
message |
string | Main response status message |
{
"message": "Session not found"
}
| Parameter | Type | Description |
|---|---|---|
message |
string | Human-readable error message |