Skip to content

OAuth endpoints

The authorization server of each project: metadata, tokens, authorization, device flow, registration, revocation and introspection.

Applies to EngineCloud
View as Markdown
On this page
  1. Discovery
  2. Endpoints
  3. The approval screens

Discovery

EndpointReturns
GET /.well-known/oauth-authorization-serverRFC 8414 metadata
GET /.well-known/openid-configurationthe same, for OpenID-minded clients
GET /.well-known/oauth-protected-resourceRFC 9728: which authorization server protects this project
GET /.well-known/jwks.jsonthe project’s public signing keys

The same metadata answers at /auth/v1/.well-known/openid-configuration and /.well-known/oauth-authorization-server/auth/v1, and the keys at /auth/v1/.well-known/jwks.json, for clients that look for them under the issuer.

JSON
{
  "issuer": "https://<ref>.data.sypnia.com/auth/v1",
  "token_endpoint": "https://<ref>.data.sypnia.com/auth/v1/oauth/token",
  "authorization_endpoint": "https://<ref>.data.sypnia.com/auth/v1/oauth/authorize",
  "device_authorization_endpoint": "https://<ref>.data.sypnia.com/auth/v1/oauth/device_authorization",
  "registration_endpoint": "https://<ref>.data.sypnia.com/auth/v1/oauth/register",
  "revocation_endpoint": "https://<ref>.data.sypnia.com/auth/v1/oauth/revoke",
  "introspection_endpoint": "https://<ref>.data.sypnia.com/auth/v1/oauth/introspect",
  "jwks_uri": "https://<ref>.data.sypnia.com/.well-known/jwks.json",
  "grant_types_supported": ["client_credentials", "authorization_code", "refresh_token", "urn:ietf:params:oauth:grant-type:device_code"],
  "token_endpoint_auth_methods_supported": ["private_key_jwt", "client_secret_basic", "client_secret_post", "none"],
  "code_challenge_methods_supported": ["S256"],
  "dpop_signing_alg_values_supported": ["EdDSA", "ES256"],
  "scopes_supported": ["data:read", "data:write", "sql:read", "sql:write", "auth:admin", "project:admin", "openid", "email", "offline_access"]
}

Endpoints

EndpointStandardDoes
POST /auth/v1/oauth/tokenRFC 6749, 7523, 8628, 9449issues tokens for client_credentials, authorization_code (PKCE required), refresh_token, urn:ietf:params:oauth:grant-type:device_code
GET /auth/v1/oauth/authorizeRFC 6749 + PKCEstarts an authorization code flow; the person signs in and consents
POST /auth/v1/oauth/device_authorizationRFC 8628{ device_code, user_code, verification_uri, verification_uri_complete, expires_in: 600, interval: 5 }
POST /auth/v1/oauth/registerRFC 7591registers a client (public by default; confidential with an initial access token)
POST /auth/v1/oauth/revokeRFC 7009revokes a refresh token (and its session) or an access token’s session
POST /auth/v1/oauth/introspectRFC 7662for resource servers of yours: is this token active, whose, which scopes: { active, sub, client_id, scope, exp, aud, cnf }; the caller authenticates as a client

Token response:

JSON
{ "access_token": "eyJ…", "token_type": "DPoP", "expires_in": 900, "scope": "data:read", "refresh_token": "syp_rt_…" }

refresh_token is present for authorization_code and device_code, never for client_credentials.

Errors follow RFC 6749 and RFC 8628 (every code): invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, invalid_scope, invalid_target, invalid_dpop_proof, use_dpop_nonce, authorization_pending, slow_down, access_denied, expired_token.

The approval screens

A device code and an authorization request are approved by a signed-in person, on a page of your app or of the console (device_verification_uri and consent_url in the project settings). The page calls these with the person’s session; a token of a machine or an app acting for the person gets 403 person_required.

EndpointDoes
GET /auth/v1/oauth/device?user_code=…what a device code asks for: { client_id, client_name, scopes, device_name, expires_at, expired, approved, denied }
POST /auth/v1/oauth/device/approve { user_code, decision }decision: approve or deny; approving privileged scopes the person was not granted answers 403 scope_not_allowed
GET /auth/v1/oauth/flows/{id}what an authorization request asks for: { client_name, scopes, redirect_host, resource }
POST /auth/v1/oauth/authorize/decision { flow_id, decision }approves or denies it; answers { redirect_to }
GET /auth/v1/device, GET /auth/v1/oauth/consentthe engine’s own minimal pages for both, used when the project sets no page of its own
  1. Discovery
  2. Endpoints
  3. The approval screens

    Search pages, sections and terms