post
/oauth2/token/revokeRevoke OAuth2 token
Revokes an access or refresh token, immediately invalidating it. Client authentication required via authorization header or client credentials. Returns 200 on success.
revoke_oauth2_token
Request body
multipart/form-data
json
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "The token to revoke"
},
"token_type_hint": {
"type": "string",
"enum": [
"access_token",
"refresh_token"
],
"x-enumNames": [
"ACCESS_TOKEN",
"REFRESH_TOKEN"
],
"x-enumDescriptions": [
"An OAuth2 access token",
"An OAuth2 refresh token"
],
"description": "A hint about the type of token being revoked"
},
"client_id": {
"$ref": "#/components/schemas/SnowflakeType"
},
"client_secret": {
"type": "string",
"description": "The application client secret"
}
},
"required": [
"token"
]
}Responses
204
No Content
400
Bad Request - The request was malformed or contained invalid data
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}429
Too Many Requests - You are being rate limited
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"RATE_LIMITED"
]
},
"message": {
"type": "string"
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying"
},
"global": {
"type": "boolean",
"description": "Whether this is a global rate limit"
}
},
"required": [
"code",
"message",
"retry_after"
]
}500
Internal Server Error - An unexpected error occurred
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}