Lotus
Type to search documentation.
Authorization

Create OAuth2 client

post/oauth2/register

Register a new OAuth2 client for dynamic client registration. This endpoint implements the Dynamic Client Registration Protocol (RFC 7591), using camelCase field names instead of the RFC’s snake_case convention (e.g., redirectUris instead of redirect_uris, grantTypes instead of grant_types). The name field is required. Other fields are optional. If not provided:

  • redirectUris defaults to an empty array. Note: When using the authorization_code grant type, redirectUris must be provided (per RFC 7591 Section 2).
  • scopes defaults to all available scopes (menu:read, menu:write, orders:read, orders:write) - grantTypes defaults to both supported grant types (authorization_code, client_credentials) Returns the registered client information per RFC 7591, including:
  • clientId and clientSecret (must be stored securely) - clientIdIssuedAt and clientSecretExpiresAt timestamps - All registered client metadata (name, redirectUris, scopes, grantTypes)

Request

Body
namestringrequired

Client name.

redirectUrisstring:uri[]

List of redirect URIs (optional, defaults to empty array).

scopesstring[]

Allowed values:"menu:read""menu:write""orders:read""orders:write"

List of scopes.

grantTypesstring[]

Allowed values:"authorization_code""client_credentials"

List of grant types.

Response

OAuth2 client registered successfully.

clientIdstringrequired

Client identifier issued by the authorization server.

clientSecretstringrequired

Client secret issued by the authorization server.

clientIdIssuedAtinteger:int64required

Time when the client_id is issued, represented as seconds since epoch (RFC7591).

clientSecretExpiresAtinteger:int64required

Time at which the client_secret expires, represented as seconds since epoch. 0 indicates the secret does not expire (RFC 7591).

namestring

Client name (registered metadata).

redirectUrisstring:uri[]

List of redirect URIs (registered metadata).

registrationClientUristring:urirequired

URL of the client configuration endpoint for managing this client registration (RFC 7592).

registrationAccessTokenstringrequired

Access token to be used at the client configuration endpoint for managing this client registration (RFC 7592).

scopesstring[]

Allowed values:"menu:read""menu:write""orders:read""orders:write"

List of scopes (registered metadata).

grantTypesstring[]

Allowed values:"authorization_code""client_credentials"

List of grant types (registered metadata).