Refresh Auth Tokens
The "Refresh Auth Tokens" endpoint allows you to refresh authentication tokens, providing a seamless and secure experience for users. Follow the instructions below to integrate this functionality.
Overview
Request Body
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1ZWJhYzUzNDk1NGI1NDEzOTgwNmMxMTIiLCJpYXQiOjE1ODkyOTg0ODQsImV4cCI6MTU4OTMwMDI4NH0.m1U63blB0MLej_WfB7yC2FTMnCziif9X8yzwDEfJXAg"
}
refreshToken
: The refresh token obtained during the initial authentication.
Responses
Success (Code 200)
{
"access": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires": "2020-05-12T16:18:04.793Z"
},
"refresh": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires": "2020-05-12T16:18:04.793Z"
}
}
access
: New access token for authentication.expires
: Expiry date and time for the new access token.refresh
: New refresh token for obtaining the next access token.
Unauthorized (Code 401)
{
"code": 401,
"message": "Please Authenticate"
}
Media Type: application/json
Example Value: An error response indicating unauthorized access.
Internal Server Error (Code 500)
{
"error": "Internal Server Error"
}
Media Type: application/json
Example Value: An error response indicating an internal server error.
Usage
Send a POST request to the provided endpoint with the refresh token.
Handle the response accordingly based on success or unauthorized access.
Note: Ensure the refresh token (refreshToken
) is valid and has not expired.
Last updated