blazex
  1. auth
blazex
  • README.md
  • auth
    • Register
      POST
    • Login
      POST
    • Refresh Token
      GET
    • Google Auth
      GET
  1. auth

Refresh Token

GET
/v1/auth/refresh-token
This endpoint allows users to obtain a new access token using a valid refresh token. This endpoint is used to maintain an authenticated session without requiring the user to log in again, enhancing security and user experience by reissuing access tokens when they expire.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/v1/auth/refresh-token' \
--header 'x-refresh-token: {{refreshToken}}'
Response Response Example
200 - Success
{
    "status": 200,
    "message": "Token refreshed successfully",
    "data": {
        "tokens": {
            "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MWY1YjNlMjBhMWY0ZTY1MmM4NTMxMyIsImVtYWlsIjoidXNlckB0ZXN0LmNvbSIsImlhdCI6MTczMDEyODI0NCwiZXhwIjoxNzMwMjE0NjQ0fQ.PnFKnqEG9BarpuMSnNLD4MnwWxadS8UITsFo3pIY_-1HBWZigRp32WnJU65cd2IUVvsH0W7KHqlM0tP8wR6lrSyNfq_ih6ZFinAWtVqkTuvn7j8-U06Sii6_k47Wu0wNU7Z7TKsNpDtCtppqLLCcVHRKN1zrDTFICE5x469sQi3YJpxV7ewE6HMAPFGcOrVbSzwo9Up27IlLr93NXYJC0XQm-shvXsve3uzu5PKYwwO7KGI3l3SNC-W05NZu4_C908AkNhyEpu-6aJ0KUjyPhH7YKaOKZ3af8s8DLhPaJLRi1Q_ygaGq544NJiGFH7DgUDIBO4QBKTs6Ugw3JNqZIA",
            "refreshToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MWY1YjNlMjBhMWY0ZTY1MmM4NTMxMyIsImVtYWlsIjoidXNlckB0ZXN0LmNvbSIsImlhdCI6MTczMDEwOTE1MywiZXhwIjoxNzMwNzEzOTUzfQ.cvdQeYK2zYQICGpbBtLmDluxTptgZlDXRgGYI_nYDCKE4YOEzCUV3g6P_cUtx5Tg9GokLTOlkDl7oJv9sA656wNgMTbOI4DYjlORnKbyyfsIZcJ3f7UdFJ49sDoQgYL_u35uHunzjFr-WN72ypTnPPbDvioxoDOpgWCENHL78ZRf56MG3PjrwivF57AUXhvNzkcQcFc_OfYV39rpYk7bRjdPTgewGoeOitSehdamU6a94UnO8iajaAx4P-lc62TaagTEEeHT915ZyAaIHyKDHPbYS-gYg2yH28Qgg6zYZdFkmhGhOEgHZHxkzqG594HSHfLWgCFPIGw-Ug4o7Heh8w"
        }
    }
}

Request

Header Params
x-refresh-token
string 
optional
Example:
{{refreshToken}}

Responses

🟢200Success
application/json
Body
status
enum<number> 
required
A numerical code representing the status of the response, typically following HTTP status conventions
Allowed values:
200201202
message
string 
required
A brief message describing the outcome of the request, providing additional context.
data
object 
required
The main content of the response, which can vary depending on the endpoint. It may include:
An object with specific properties (e.g., for single resource responses),
An array of objects (e.g., for listing multiple resources),
Or a string (e.g., for simple messages or confirmations).
tokens
object 
required
🟠400BadRequest
🟠401Unauthorized
🔴500InternalServerError
Modified at 2024-10-28 15:13:55
Previous
Login
Next
Google Auth
Built with