Skip to main content
GET
/
oauth
/
apps
/
{clientId}
/
tokens
List tokens for OAuth application
curl --request GET \
  --url http://sandbox.mintlify.com/oauth/apps/{clientId}/tokens \
  --header 'Authorization: Bearer <token>'
Lists all active tokens for an OAuth application. Only OWNERS and ADMINS can view tokens.

Permissions

Only OWNERS and ADMINS can list tokens for OAuth applications.

Path Parameters

ParameterTypeRequiredDescription
clientIdstringYesOAuth application client ID

Example Request

curl -X GET http://localhost:3001/api/oauth/apps/app_1234567890abcdef/tokens \
  -H "Authorization: Bearer <token>"

Example Response

[
  {
    "id": "token_1234567890abcdef",
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "scopes": ["read:user", "read:organization"],
    "expiresAt": "2025-01-27T10:00:00Z",
    "createdAt": "2025-01-26T10:00:00Z",
    "lastUsedAt": "2025-01-26T15:30:00Z"
  }
]

Use Cases

  • Audit active tokens for security
  • Monitor token usage
  • Identify unused tokens for cleanup
  • Track token expiration dates

Common Errors

401 Unauthorized

Authentication required.

403 Forbidden

Only owners and admins can view tokens.

404 Not Found

OAuth application not found with the provided client ID.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

clientId
string
required

Response

Tokens retrieved successfully. Returns array of tokens with scopes, expiration, and usage info.