Refresh Token
POST/refresh-token
A user’s token expires after 15 minutes. This endpoint handles refreshing the user’s token without disrupting their experience. It is triggered within the 30-second window before the token expires.
Responses
- 200
- 400
- 401
Returns a new access token
- application/json
- Schema
- Example (from schema)
- Example
Schema
token string
{
"token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"
}
{
"token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
error string
Details about the error
extras
object
object
{
"error": "Invalid input",
"extras": {
"field_foo": "field_foo is required",
"field_bar": "field_bar needs to be an integer"
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
extras
object
status number
message string
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
Loading...