Rotate an OAuth client's secret
/api/v1/oauth-clients/{id}/rotate-secretRotates the OAuth client's client_secret, generating and hashing a new secret and invalidating the old one. The new raw secret is returned in this response only and cannot be retrieved again. Returns 404 when the client is not found in the current Environment.
Authentication
Bearer Token
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
API Key
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Path Parameters
idstring Required Responses
application/json
data *OAuthClientSecretRotatedResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/api/v1/oauth-clients/value/rotate-secret" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "data": { "client_id": "string", "client_secret": "string" } }
Tell us how we can improve this guide.