Skip to content
Subako Docs
English
Esc
↑↓navigate↵open⌘Jpreview

Update an OAuth client

Changes a client in place. An omitted field is left as it stands, including token_endpoint_auth: send one only to change the method or rotate the secret. The client keeps its id, so every credential connected through it refreshes with what it holds now. The endpoints and client_id cannot change, since the credentials connected through the client present their refresh tokens there: create another client for another provider.

PATCH/v1/oauth-clients/{oauth_client_id}
Authorization
AuthorizationBearer token · headerrequired
Path parameters
oauth_client_idstring<uuid>required
OAuth client id
Request body
requiredapplication/json
authorization_paramsAuthorizationParamBody[] | null
max items 16
Show properties
Array of AuthorizationParamBody
namestringrequired
Letters, digits, and `-._~`; none Subako sets itself (`response_type`, `client_id`, `redirect_uri`, `state`, `code_challenge`, `code_challenge_method`, `scope`, `resource`).
min length 1 · max length 64
valuestringrequired
max length 512
display_namestring | null
max length 200
scopesOAuthScopeBody[] | null
max items 64
token_endpoint_authany | TokenEndpointAuthBody
Show properties
One of:
any
any
TokenEndpointAuthBody
One of:
object
methodstringrequired
Allowed:none
object
client_secretstringrequired
min length 1 · max length 1024
methodstringrequired
Allowed:client_secret_post
object
client_secretstringrequired
min length 1 · max length 1024
methodstringrequired
Allowed:client_secret_basic
Responses
200The updated client. Carries no secret.
authorization_endpointstringrequired
authorization_paramsAuthorizationParamBody[]required
Show properties
Array of AuthorizationParamBody
namestringrequired
Letters, digits, and `-._~`; none Subako sets itself (`response_type`, `client_id`, `redirect_uri`, `state`, `code_challenge`, `code_challenge_method`, `scope`, `resource`).
min length 1 · max length 64
valuestringrequired
max length 512
client_idstringrequired
created_atstring<date-time>required
display_namestringrequired
idstring<uuid>required
scopesOAuthScopeBody[]required
token_endpointstringrequired
token_endpoint_auth_methodTokenEndpointAuthMethodBodyrequired
How the client authenticates at the token endpoint, without its secret.
Allowed:noneclient_secret_postclient_secret_basic
updated_atstring<date-time>required
workspace_idstring<uuid>required
400Malformed body, path parameter, a field outside its bound, or a field that cannot change.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
401Missing, malformed, or invalid bearer token.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
403Caller lacks vault.manage.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
404No such client, or the caller cannot see it.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH "https://api.us.cloud.subako.ai/v1/oauth-clients/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "authorization_params": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "display_name": "string",
  "scopes": [
    "string"
  ],
  "token_endpoint_auth": {}
}'
Response
{
  "authorization_endpoint": "string",
  "authorization_params": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "client_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "display_name": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "scopes": [
    "string"
  ],
  "token_endpoint": "string",
  "token_endpoint_auth_method": "none",
  "updated_at": "2019-08-24T14:15:22Z",
  "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
}