Skip to main content

Regenerate Client Secret

Regenerate the client secret for an OAuth application.

Endpoint

POST /api/v1/organizations/{org_id}/oauth-applications/{app_id}/regenerate-secret

Headers

HeaderRequiredDescription
AuthorizationYesBearer <access_token>

Path Parameters

ParameterTypeRequiredDescription
org_idintegerYesOrganization ID
app_idintegerYesApplication ID

Response

Success (200)

{
"success": true,
"data": {
"client_secret": "new_secret_xyz789...",
"message": "Client secret regenerated successfully"
},
"message": "Client secret regenerated successfully"
}

Error (404)

{
"success": false,
"error": {
"code": "application_not_found",
"message": "Application not found"
}
}

Features

  • Generates a new client secret
  • New secret is shown only once
  • Old secret is invalidated immediately
  • All existing tokens for this application are revoked
  • Only accessible by organization admins

Important Notes

WARNING: Save the new client_secret immediately, it won't be shown again!

WARNING: All existing tokens for this application will be invalidated!

Example

curl -X POST "https://api.rivergen.com/api/v1/organizations/1/oauth-applications/1/regenerate-secret" \
-H "Authorization: Bearer <access_token>"