Skip to content
Notice This app is in Beta Testing We are still testing Record Sender, so features may change.
Sign in

OAuth — API reference

The OAuth 2.1 authorization server: authorization code + PKCE, refresh rotation, client credentials, the device grant, revocation and introspection. Errors are RFC 6749 `{error, error_description}`.

← All groups
GET /.well-known/oauth-authorization-server

Authorization server metadata (RFC 8414)

Any valid credential · oauth.metadata

Responses 200 · 401 · 429

200 Success

object

401 Problem details (401)

429 Problem details (429)

GET /.well-known/oauth-protected-resource

Protected resource metadata (RFC 9728)

Any valid credential · oauth.resource_metadata

Responses 200 · 401 · 429

200 Success

authorization_servers [string (uri)]
bearer_methods_supported [string]
resource string (uri)
scopes_supported [string]

401 Problem details (401)

429 Problem details (429)

GET /.well-known/oauth-protected-resource/mcp

Protected resource metadata (RFC 9728)

Any valid credential · oauth.resource_metadata_get

Responses 200 · 401 · 429

200 Success

authorization_servers [string (uri)]
bearer_methods_supported [string]
resource string (uri)
scopes_supported [string]

401 Problem details (401)

429 Problem details (429)

GET /oauth/authorize

The consent screen (browser)

Signed in; PKCE S256 required. Answers HTML; on a decision it redirects to the client.

Any valid credential · oauth.authorize

ParameterInTypeDescription
response_type *query"code"
client_id *querystring
redirect_uriquerystring (uri)
scopequerystring
statequerystring
code_challenge *querystring
code_challenge_method *query"S256"
resourcequerystring (uri)
account_idquerystring (uuid)
Responses 200 · 401 · 429

200 Success

string

401 Problem details (401)

429 Problem details (429)

POST /oauth/authorize

Approve or deny (browser form)

Any valid credential · oauth.decide

Request body application/x-www-form-urlencoded
account_id string (uuid)
decision * "allow" | "deny"
mailbox_ids [string (uuid)]
scopes [string]
workspace_ids [string (uuid)]
Responses 302 · 401 · 429

302 Redirect

401 Problem details (401)

429 Problem details (429)

GET /oauth/device

The device grant's verification page (browser)

Any valid credential · oauth.device

ParameterInTypeDescription
user_codequerystring
Responses 200 · 401 · 429

200 Success

string

401 Problem details (401)

429 Problem details (429)

POST /oauth/device/approve

Approve or deny a device (browser form)

Any valid credential · oauth.device_decide

Request body application/x-www-form-urlencoded
account_id string (uuid)
decision * "allow" | "deny"
scopes [string]
user_code * string
workspace_ids [string (uuid)]
Responses 200 · 401 · 429

200 Success

string

401 Problem details (401)

429 Problem details (429)

POST /oauth/device_authorization

Start the device grant (RFC 8628)

Any valid credential · oauth.device_authorization

Request body application/x-www-form-urlencoded
client_id * string
scope string
Responses 200 · 401 · 429

200 Success

device_code string
expires_in integer
interval integer
user_code string
verification_uri string (uri)
verification_uri_complete string (uri)

401 Problem details (401)

429 Problem details (429)

POST /oauth/introspect

Introspect a token (RFC 7662)

A client learns about its own tokens only.

Any valid credential · oauth.introspect

Request body application/x-www-form-urlencoded
client_id string
client_secret string
token * string
Responses 200 · 401 · 429

200 Success

OAuthIntrospection

account_id string (uuid)
active * boolean
aud string
client_id string
exp integer
grant_type string
iat integer
iss string
mailbox_ids [string (uuid)]
scope string
sub string | null
token_type string
username string | null
workspace_ids [string (uuid)]

401 Problem details (401)

429 Problem details (429)

POST /oauth/register

Dynamic client registration (RFC 7591, public clients)

Any valid credential · oauth.register

Request body application/json
client_name string
client_uri string (uri)
logo_uri string (uri)
redirect_uris * [string (uri)]
scope string
Responses 201 · 401 · 429

201 Success

client_id string
client_id_issued_at integer
client_name string
grant_types [string]
redirect_uris [string]
scope string
token_endpoint_auth_method string

401 Problem details (401)

429 Too many registrations

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)
POST /oauth/revoke

Revoke a token (RFC 7009)

Any valid credential · oauth.revoke

Request body application/x-www-form-urlencoded
client_id string
client_secret string
token * string
token_type_hint "access_token" | "refresh_token"
Responses 200 · 401 · 429

200 Success

object

401 Problem details (401)

429 Problem details (429)

POST /oauth/token

The token endpoint

grant_type = authorization_code (code, code_verifier, redirect_uri), refresh_token (refresh_token, scope to narrow), client_credentials (account_id, scope) or urn:ietf:params:oauth:grant-type:device_code (device_code).

Any valid credential · oauth.token

Request body application/x-www-form-urlencoded
account_id string (uuid)
client_id string
client_secret string
code string
code_verifier string
device_code string
grant_type * string
redirect_uri string
refresh_token string
resource string
scope string
Responses 200 · 400 · 401 · 429

200 Success

OAuthToken

access_token * string rso_at_…, one hour
expires_in * integer
refresh_token string rso_rt_…, 30 days; rotated on each use
scope string
token_type * "Bearer"

400 invalid_grant, invalid_request, invalid_scope, authorization_pending, slow_down, expired_token, access_denied, unsupported_grant_type

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

401 Problem details (401)

429 Problem details (429)