Skip to main content

Logout

Logout and invalidate the current session.

Endpoint

POST /api/v3/auth/logout

Description

Invalidates the current user session. After logout, the access token and refresh token will no longer be valid.

Authentication

Requires Bearer token authentication.

Authorization: Bearer {access_token}

Request Body

No request body required.

Response

Returns a simple success response.

FieldTypeDescription
datastringSuccess message (ok)

Usage

import requests

headers = {"Authorization": f"Bearer {access_token}"}

response = requests.post(
"https://cadenza-api-uat.algo724.com/api/v3/auth/logout",
headers=headers
)
curl -X POST https://cadenza-api-uat.algo724.com/api/v3/auth/logout \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Example Response

{
"data": "ok",
"success": true,
"errno": 0,
"error": null
}

Error Responses

HTTP CodeErrorDescription
401UnauthorizedInvalid or expired token

Notes

  • After logout, both access token and refresh token become invalid
  • The client should discard stored tokens after logout
  • Re-authentication via login is required to obtain new tokens