Skip to main content
DELETE
/
v1
/
auth
/
oauth
/
revoke

Overview

Revoke OAuth authorization and invalidate all access/refresh tokens for the authenticated client. After revocation:
  • All existing access tokens become invalid
  • All existing refresh tokens become invalid
  • Client must restart OAuth flow from Step 1 to regain access
This does NOT log the user out of their account - it only revokes the OAuth client’s access.

Request

Headers

x-client-key
string
required
Your public API client key
Authorization
string
required
Bearer tokenFormat: Bearer ACCESS_TOKEN

Response

{
  "success": true
}

Code Examples

curl -X DELETE "https://dev.api.baanx.com/v1/auth/oauth/revoke" \
  -H "x-client-key: your-client-key" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Use Cases

  • User explicitly revokes third-party app access
  • Security: Invalidate tokens after detecting suspicious activity
  • Logout: Clean up authorization on user logout
  • Compliance: Allow users to manage connected applications