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
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | integer | Yes | Organization ID |
app_id | integer | Yes | Application 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>"
Related Endpoints
- Update Application - Update application
- Get Application - Get application details