Skip to content
Skip to Content
Coder Docs

OAuth2 dynamic client registration (RFC 7591)

POST
/oauth2/register

Request Body

Client registration request

application/json
  1. body
client_name?string
client_uri?string
contacts?array<string>
grant_types?array<>
jwks?
jwks_uri?string
logo_uri?string
policy_uri?string
redirect_uris?array<string>
response_types?array<>
scope?string
software_id?string
software_statement?string
software_version?string
token_endpoint_auth_method?codersdk.OAuth2TokenEndpointAuthMethod
Value in"client_secret_basic""client_secret_post""none"
tos_uri?string

Response Body

Created

application/json
  1. response
client_id?string
client_id_issued_at?integer
client_name?string
client_secret?string
client_secret_expires_at?integer
client_uri?string
contacts?array<string>
grant_types?array<>
jwks?
jwks_uri?string
logo_uri?string
policy_uri?string
redirect_uris?array<string>
registration_access_token?string
registration_client_uri?string
response_types?array<>
scope?string
software_id?string
software_version?string
token_endpoint_auth_method?codersdk.OAuth2TokenEndpointAuthMethod
Value in"client_secret_basic""client_secret_post""none"
tos_uri?string

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X POST \	"$CODER_URL/oauth2/register" \	-H "Content-Type: application/json" \	-d '{  "client_name": "string",  "client_uri": "string",  "contacts": [    "string"  ]}'
Example Response
{  "client_id": "string",  "client_id_issued_at": 0,  "client_name": "string",  "client_secret": "string",  "client_secret_expires_at": 0,  "client_uri": "string",  "contacts": [    "string"  ],  "grant_types": [    "authorization_code"  ],  "jwks": {},  "jwks_uri": "string",  "logo_uri": "string",  "policy_uri": "string",  "redirect_uris": [    "string"  ],  "registration_access_token": "string",  "registration_client_uri": "string",  "response_types": [    "code"  ],  "scope": "string",  "software_id": "string",  "software_version": "string",  "token_endpoint_auth_method": "client_secret_basic",  "tos_uri": "string"}