Update OAuth2 application.
CoderSessionTokenCoder-Session-Token<token>app*stringApp ID
Update an OAuth2 application.
application/json- body
callback_url?stringDeprecated: send redirect_uris instead. If both are sent, callback_url must equal the first entry of redirect_uris.
icon?stringIcon replaces the app's stored icon. Omitting it clears the stored icon rather than leaving it unchanged.
name*stringredirect_uris?array<string>RedirectURIs is the ordered list of URIs the app may redirect to. The first entry is the primary. Omit both this and callback_url to keep the stored redirect URIs. Other fields are replaced. Sending an empty list is an error, not a way to keep the stored list.
scope?stringScope replaces the app's current allowlist. Omit to leave the existing allowlist untouched. Set to an empty string to clear it, making the app unrestricted.
OK
application/json- response
callback_url?stringDeprecated: equal to the first entry of redirect_uris. Read redirect_uris instead.
client_type?stringClientType is "confidential" or "public".
"confidential""public"dynamically_registered?booleanDynamicallyRegistered is true when the app registered itself through Dynamic Client Registration rather than being created by an admin.
endpoints?Endpoints are included in the app response for easier discovery. The OAuth2 spec does not have a defined place to find these (for comparison, OIDC has a '/.well-known/openid-configuration' endpoint).
icon?stringid?stringuuidname?stringredirect_uris?array<string>RedirectURIs are the app's registered redirect URIs, primary first.
scope?stringScope is the space-separated list of scopes this app's tokens may be granted. Empty means unrestricted. A non-empty value with no names is a configured allowlist that grants nothing.
The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X PUT \ "$CODER_URL/api/v2/oauth2-provider/apps/{app}" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string"}'{ "callback_url": "string", "client_type": "confidential", "dynamically_registered": true, "endpoints": { "authorization": "string", "device_authorization": "string", "token": "string", "token_revoke": "string" }, "icon": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "redirect_uris": [ "string" ], "scope": "string"}