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.
| Field | Type | Description |
|---|---|---|
data | string | Success 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 Code | Error | Description |
|---|---|---|
| 401 | Unauthorized | Invalid 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