Register a new OAuth2 client, implementing the Dynamic Client Registration Protocol (RFC 7591) with the standard snake_case metadata names, so off-the-shelf DCR clients work without modification. Responses use only the standard snake_case names (RFC 7591 Section 3.2.1).
All fields are optional. If not provided:
scopedefaults to all available scopes (menu:read menu:write orders:read orders:write revenue:read)grant_typesdefaults toauthorization_code,client_credentials, andrefresh_tokentoken_endpoint_auth_methoddefaults toclient_secret_basic(RFC 7591 Section 2); both supported methods are accepted at the token endpoint regardless of the registered value
This server registers confidential clients only: every client is issued a client_secret, and token_endpoint_auth_method: none (public clients such as SPAs or mobile apps, RFC 7591 Section 2) is not supported by design.
redirect_uris is required whenever the effective grant types include authorization_code (RFC 7591 Section 2), including when grant_types is omitted, since the default includes it. Register with grant_types: ["client_credentials"] for a client that needs no redirect URI.
Refresh token behavior follows the registered grant types: the token endpoint returns a refresh token with authorization_code grant responses only when the client registered the refresh_token grant type. The client_credentials grant never returns refresh tokens (RFC 6749 Section 4.4.3). Those clients request a new access token with their own credentials instead.
Returns the registered client information per RFC 7591 Section 3.2.1, including:
client_idandclient_secret(must be stored securely)client_id_issued_atandclient_secret_expires_attimestampsregistration_client_uriandregistration_access_tokenfor managing the registration (RFC 7592)- All registered client metadata
Errors use the RFC 7591 Section 3.2.2 format: 400 with error set to invalid_redirect_uri or invalid_client_metadata and a human-readable error_description.
Effective grant types include authorization_code — explicitly, or by default when grant_types is omitted. A non-empty redirect_uris is required. Other grant types (client_credentials, refresh_token) can be registered alongside.
Redirect URIs for the authorization_code grant. Compared with exact string matching at authorization time (RFC 6749 Section 3.1.2.3).
Space-separated list of scopes. Defaults to all available scopes.
Grant types the client may use. A refresh token is issued with authorization_code grant responses only when refresh_token is included here. The client_credentials grant never returns one (RFC 6749 Section 4.4.3).
Requested client authentication method for the token endpoint, registered as client metadata and echoed in registration responses. Defaults to client_secret_basic (RFC 7591 Section 2). The token and revocation endpoints accept both methods for every client regardless.
- Mock serverhttps://cafe.redocly.com/_mock/openapi/cafe/oauth2/register
- Live server.https://api.cafe.redocly.com/oauth2/register
curl -i -X POST \
https://cafe.redocly.com/_mock/openapi/cafe/oauth2/register \
-H 'Content-Type: application/json' \
-d '{
"client_name": "auth",
"scope": "menu:read menu:write orders:read orders:write revenue:read",
"grant_types": [
"client_credentials"
]
}'OAuth2 client registered successfully.
Time when the client_id is issued, represented as seconds since epoch (RFC 7591).
Time at which the client_secret expires, represented as seconds since epoch. 0 indicates the secret does not expire (RFC 7591).
URL of the client configuration endpoint for managing this client registration (RFC 7592).
Bearer token for the client configuration endpoint (RFC 7592). Store it securely.
Registered grant types.
Registered token endpoint authentication method. Defaults to client_secret_basic when not requested at registration (RFC 7591 Section 2). The token and revocation endpoints accept both methods for every client regardless.
{ "client_id": "string", "client_secret": "string", "client_id_issued_at": 0, "client_secret_expires_at": 0, "registration_client_uri": "http://example.com", "registration_access_token": "string", "client_name": "string", "redirect_uris": [ "http://example.com" ], "grant_types": [ "authorization_code" ], "scope": "string", "token_endpoint_auth_method": "client_secret_basic" }