Authorization endpoint

Initiates the OAuth 2.0 authorization code flow. Direct users to this endpoint to request authorization.

Authorization Code Flow Steps
  1. Direct the user's browser to this endpoint with required parameters
  2. User logs in (if not already authenticated) and authorizes your application
  3. User is redirected to your redirect_uri with an authorization code parameter
  4. Exchange the code for an access token at /oauth/token
PKCE (Proof Key for Code Exchange)

For public clients (mobile/SPA applications), PKCE is recommended for security:
1. Generate a random code_verifier (43-128 characters)
2. Create code_challenge = BASE64URL(SHA256(code_verifier))
3. Include code_challenge and code_challenge_method=S256 in this request
4. Include code_verifier when exchanging the code at /oauth/token

Important Notes
  • This is a browser-based flow - users will see a login/authorization screen
  • The redirect_uri must be pre-registered with your OAuth application
  • The authorization code expires after 10 minutes
  • Some applications may be configured to skip the authorization screen (auto-approve)
GET /oauth/authorize

Parameters

Query Parameters

response_type string
Required

OAuth response type (must be "code" for authorization code flow)

client_id string
Required

Your OAuth application's client ID

redirect_uri string
Required

URI to redirect to after authorization (must match registered redirect URI)

scope string
Required

Space-separated list of requested scopes (see available scopes in security schemes section)

state string
Optional

Opaque value to maintain state between request and callback (recommended for CSRF protection)

code_challenge string
Optional

PKCE code challenge (BASE64URL(SHA256(code_verifier)))

code_challenge_method string
Optional

PKCE code challenge method (must be S256)

Request

curl -X GET \
  "https://api.doorflow.com/oauth/authorize"

Responses

Redirects to redirect_uri with authorization code or error. **Success redirect:** `https://example.com/callback?code=AUTH_CODE&state=STATE` **Error redirect:** `https://example.com/callback?error=access_denied&error_description=DESCRIPTION&state=STATE`

{}