OAuth
OAuth 2.0 authorization endpoints for third-party integrations
Query Parameters (handled by Authlib): client_id: OAuth client identifier redirect_uri: Where to redirect after authorization response_type: Must be 'code' scope: Space-separated list of requested scopes state: CSRF protection token (optional but recommended) code_challenge: PKCE code challenge code_challenge_method: PKCE method (usually 'S256')
Returns: Redirect to React consent page with OAuth params and client info
Bad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
GET /oauth/authorize HTTP/1.1
Accept: */*
{
"error": "text",
"message": "text",
"errors": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"detail": null,
"code": null,
"status": "text",
"url": null,
"timestamp": "text",
"type": "text"
}Query Parameters: All OAuth params from GET (client_id, redirect_uri, state, etc.)
Form Parameters: confirm: 'yes' to authorize, 'no' to deny
Returns: Redirect to client with authorization code or error
Bad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
POST /oauth/authorize HTTP/1.1
Accept: */*
{
"error": "text",
"message": "text",
"errors": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"detail": null,
"code": null,
"status": "text",
"url": null,
"timestamp": "text",
"type": "text"
}Form Parameters (authorization_code grant): grant_type: Must be 'authorization_code' code: Authorization code from /authorize redirect_uri: Must match original request client_id: OAuth client identifier code_verifier: PKCE code verifier
Form Parameters (refresh_token grant): grant_type: Must be 'refresh_token' refresh_token: Valid refresh token client_id: OAuth client identifier
Returns: JSON response with access_token (JWT), refresh_token, expires_in, etc.
Bad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
POST /oauth/token HTTP/1.1
Accept: */*
{
"error": "text",
"message": "text",
"errors": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"detail": null,
"code": null,
"status": "text",
"url": null,
"timestamp": "text",
"type": "text"
}Returns: List of active sessions including client info, creation time, and scope
OK
[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\ZBad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
GET /oauth/sessions HTTP/1.1
Accept: */*
[
{
"token_id": "text",
"client_name": "text",
"client_id": "text",
"created_at": 1,
"scope": "text"
}
]Args: token_id: UUID of the OAuth token to revoke
Returns: 204 No Content on success 404 Not Found if session doesn't exist or doesn't belong to user
No Content
No content
Bad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
DELETE /oauth/sessions/{token_id} HTTP/1.1
Accept: */*
No content
Returns: JSON with message and count of revoked sessions
OK
Bad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
POST /oauth/revoke-all HTTP/1.1
Accept: */*
{
"message": "text",
"count": 1
}Form Parameters: token: The token to revoke (access_token or refresh_token) token_type_hint: Optional hint about token type ('access_token' or 'refresh_token')
Returns: 200 response (always returns 200 per RFC 7009, even for invalid tokens)
Bad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
POST /oauth/revoke HTTP/1.1
Accept: */*
{
"error": "text",
"message": "text",
"errors": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"detail": null,
"code": null,
"status": "text",
"url": null,
"timestamp": "text",
"type": "text"
}Bad request
Unauthorized
Forbidden
Not found
Method not allowed
Conflict
Internal server error
Default error response
POST /oauth/register HTTP/1.1
Accept: */*
{
"error": "text",
"message": "text",
"errors": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"detail": null,
"code": null,
"status": "text",
"url": null,
"timestamp": "text",
"type": "text"
}Last updated
Was this helpful?

