API Reference
Last updated
Last updated
Endpoint: GET /v1/oauth/authorize
Description: Initiates the OAuth 2.0 authorization flow. REQUIRES JAR (JWT-Secured Authorization Request).
URL: {base_url}/v1/oauth/authorize
client_id
string
✅
Your application's client ID
request
string
✅
JAR token containing all OAuth parameters
The request parameter must contain a signed JWT with these claims:
Required JWT Claims:
Optional Claims:
Authorization endpoint errors are returned as URL parameters in the redirect URI (if valid) or as an error page.
Error Response Format:
Common Error Codes:
*Note: invalid_request is retryable only for JAR expiration scenarios
Error Response Examples:
Endpoint: POST /v1/oauth/token
Description: Exchanges authorization code for access tokens.
URL: {base_url}/v1/oauth/token
For Authorization Code Grant:
For Refresh Token Grant:
Token endpoint errors are returned as JSON in the response body.
Error Response Format:
Common Error Codes:
Error Response Examples:
Endpoint: POST /v1/token/validate
Description: Validates an access token and returns token information.
URL: {base_url}/v1/token/validate
Endpoint: GET /v1/userinfo
Description: Returns user information for a valid access token.
URL: {base_url}/v1/userinfo
Endpoint: GET /.well-known/openid_configuration
Description: Returns OpenID Connect configuration metadata.
URL: {base_url}/.well-known/openid_configuration
Endpoint: GET /.well-known/jwks.json
Description: Returns JSON Web Key Set for token verification.
URL: {base_url}/.well-known/jwks.json
All endpoints are subject to rate limiting:
When rate limits are exceeded, the following headers are returned:
All error responses follow this standard format:
Custom scopes can be defined per application. Contact support for custom scope configuration.
Access tokens are JWTs signed with RS256 or EdDSA:
ID tokens are JWTs signed with RS256:
Refresh tokens are opaque strings that can be used to obtain new access tokens.
All endpoints MUST be accessed over HTTPS. HTTP requests will be rejected.
All authorization requests MUST use JAR (JWT-Secured Authorization Request). Traditional OAuth query parameters will be rejected.
PKCE (Proof Key for Code Exchange) is required for all public clients and recommended for confidential clients.
Always validate tokens before use:
See Step 1: Choose OAuth Library for recommended third-party libraries.
For API support and questions:
Status: 302 Found Location: https://yourapp.com/callback?code=abc123&state=xyz789
📖 Complete Error Reference: See Error Codes Reference for comprehensive error documentation.
invalid_request
Missing request parameter or other required parameters
400
No*
invalid_request_object
Invalid JAR token
400
No
invalid_client
Client auth failed or IP not whitelisted
401
No
unauthorized_client
Client not authorized for grant type
403
No
access_denied
User denied authorization
400
Yes
server_error
Internal server error
500
Yes
grant_type
string
✅
Must be authorization_code
code
string
✅
Authorization code from callback
redirect_uri
string
✅
Must match authorization request
client_id
string
✅
Your application's client ID
code_verifier
string
✅
PKCE code verifier
client_secret
string
⚠️
Required for confidential clients
grant_type
string
✅
Must be refresh_token
refresh_token
string
✅
Valid refresh token
client_id
string
✅
Your application's client ID
client_secret
string
⚠️
Required for confidential clients
Status: 200 OK Content-Type: application/json
📖 Complete Error Reference: See Error Codes Reference for comprehensive error documentation.
invalid_request
Missing required parameter
400
No
invalid_client
Client authentication failed
401
No
invalid_grant
Authorization code/refresh token invalid
400
No
unauthorized_client
Client not authorized for grant type
403
No
unsupported_grant_type
Grant type not supported
400
No
server_error
Internal server error
500
Yes
token
string
✅
Access token to validate
Status: 200 OK Content-Type: application/json
invalid_token
Token is invalid or expired
401
invalid_request
Missing token parameter
400
Status: 200 OK Content-Type: application/json
invalid_token
Token is invalid or expired
401
insufficient_scope
Token lacks required scope
403
Status: 200 OK Content-Type: application/json
Status: 200 OK Content-Type: application/json
/v1/oauth/authorize
10 requests
per minute per IP
/v1/oauth/token
60 requests
per minute per client
/v1/token/validate
1000 requests
per minute per client
/v1/userinfo
100 requests
per minute per token
Discovery endpoints
100 requests
per minute per IP
/v1/oauth/authorize
20 requests
per minute per IP
/v1/oauth/token
120 requests
per minute per client
/v1/token/validate
2000 requests
per minute per client
/v1/userinfo
200 requests
per minute per token
Discovery endpoints
200 requests
per minute per IP
invalid_request
Request is missing required parameters or malformed
400
invalid_client
Client authentication failed
401
invalid_grant
Authorization grant is invalid, expired, or revoked
400
unauthorized_client
Client is not authorized for this grant type
400
unsupported_grant_type
Grant type is not supported
400
invalid_scope
Requested scope is invalid or unknown
400
access_denied
User denied the authorization request
400
server_error
Internal server error
500
temporarily_unavailable
Service temporarily unavailable
503
invalid_request
JAR required, JAR expired, or missing parameters
400
invalid_request_object
JAR signature verification failed
400
rate_limit_exceeded
Rate limit exceeded
429
Note: Oten IDP uses standard OAuth 2.0 error codes. Specific scenarios like JAR requirements, workspace selection, or MFA requirements are indicated through the error_description parameter.
openid
Required for OIDC flow
sub
profile
Basic profile information
name, given_name, family_name, picture, locale, updated_at
email
Email address
email, email_verified
phone
Phone number
phone_number, phone_number_verified
offline_access
Request refresh token
read
Read access to resources
write
Write access to resources
Verify signature using JWKS
Check expiration (exp claim)
Verify audience (aud claim)
Verify issuer (iss claim)
Go: gitlab.oten.com/go-sdk/go-oauth/client
JavaScript/Node.js: Coming soon
Python: Coming soon
Technical Support: support@oten.live
Configuration Reference - Endpoints and settings
JAR Complete Implementation Guide - JAR implementation examples
Developer Integration Guide - Complete integration process