Create OAuth2 client
/oauth2/registerRegister 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:
redirectUrisdefaults to an empty array. Note: When using theauthorization_codegrant type,redirectUrismust be provided (per RFC 7591 Section 2).scopesdefaults to all available scopes (menu:read, menu:write, orders:read, orders:write) -grantTypesdefaults to both supported grant types (authorization_code, client_credentials) Returns the registered client information per RFC 7591, including:clientIdandclientSecret(must be stored securely) -clientIdIssuedAtandclientSecretExpiresAttimestamps - All registered client metadata (name, redirectUris, scopes, grantTypes)
Request
namestringrequiredClient 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.
clientIdstringrequiredClient identifier issued by the authorization server.
clientSecretstringrequiredClient secret issued by the authorization server.
clientIdIssuedAtinteger:int64requiredTime when the client_id is issued, represented as seconds since epoch (RFC7591).
clientSecretExpiresAtinteger:int64requiredTime at which the client_secret expires, represented as seconds since epoch. 0 indicates the secret does not expire (RFC 7591).
namestringClient name (registered metadata).
redirectUrisstring:uri[]List of redirect URIs (registered metadata).
registrationClientUristring:urirequiredURL of the client configuration endpoint for managing this client registration (RFC 7592).
registrationAccessTokenstringrequiredAccess 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).
Bad request - invalid input parameters.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Unauthorized - authorization required.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Internal server error.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.