AuthnAuthzAPI
Get Started
Get Started
  1. Authentication
  • Overview
  • Registration & Onboarding
    • Register a new user
      POST
    • Verify email address
      POST
    • Resend verification code
      POST
  • Authentication
    • Login user
      POST
    • Logout user
      POST
    • Request a password reset email
      POST
    • Verify password reset token
      POST
    • Update password
      POST
    • Refresh access token
      POST
    • Get current authenticated user
      GET
  • OAuth Authentication
    • OAuth authentication
      GET
    • OAuth callback
      GET
  • Session Management
    • Get all sessions
      GET
    • Revoke session
      DELETE
    • Revoke all sessions
      DELETE
  • Profile Management
    • View profile information
      GET
    • Update profile information
      PATCH
  1. Authentication

Refresh access token

Developing
POST
/auth/refresh-token
Generates a new access token using a valid refresh token without requiring the user to log in again. This endpoint is used to maintain authenticated sessions securely after the access token expires.
The server validates the provided refresh token, checks whether it is active, unexpired, and not revoked, then issues a new access token.
If the refresh token is invalid, expired, revoked, or associated with a terminated session, the request is rejected and the user must authenticate again using the login endpoint.

Request

Cookie Params

Responses

🟢200Success
application/json
Bodyapplication/json

🟠401 Refresh Token Missing
🟠401Refresh Token Invalid or Malformed
🟠401Refresh Token Expired
🟠401Session Revoked
🟠429Rate Limit Exceeded
🔴500Internal Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:3000/api/v1/auth/refresh-token' \
--header 'Cookie: rt='
Response Response Example
200 - Example
{
    "status": "success",
    "message": "Access token refreshed successfully.",
    "data": {
        "access_token": "dc6157107f749c3dd08bce998bd3cf0c35e28a9d5d2f82ae739e3a5dbb468d8b"
    }
}
Modified at 2026-05-16 22:12:28
Previous
Update password
Next
Get current authenticated user
Built with