Change secret

put/oauth/clients/{clientId}/secret
Internal-Use Only

Changes the secret for the client that is specified in the request. Authorization: Bearer token with clients.write, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

Request Samples

1

Response Samples

1{
2 "status": "ok",
3 "message": "secret updated"
4}

Path Parameters

NameTypeRequiredDescription
clientId
string
true

The ID of the request client.

Request Body

The client secret information

The client secret information.

NameTypeRequiredDescription
clientId
string
true

The client identifier that is unique within identity zone.

oldSecret
string
false

The valid client secret before updating. This is optional if authenticated as an admin client. Otherwise, it is required.

secret
string
true

The new client secret.

changeMode
string
false

(Optional) The default is UPDATE. If change mode is set to ADD, then the new secret is added to the existing one. If the change mode is set to DELETE, then the old secret is deleted to support secret rotation. Only two client secrets are supported at any given time.

Responses

StatusMeaningDescription
200OKThe request succeeded. The secret was updated.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo client exists at the requested path. The requested client could not be updated.