Regenerate the client secret for a Draft or Rejected OAuth application on Vultr and immediately invalidate the previous secret, using the Console or API.
The client secret authenticates your OAuth application when it exchanges authorization codes for access tokens. Regenerating the secret issues a new value and immediately invalidates the old one, which is useful when a secret is lost or you want to rotate credentials before the application goes live.
Follow this guide to regenerate an OAuth application client secret using the Vultr Console and the Vultr API.
Draft or Rejected status. An Active or PendingReview application returns an HTTP 409 Conflict response, because rotating a live secret would break running integrations. For a live application, create a new application and migrate to it instead.
Log in to the Vultr Console.
Click the organization name in the top navigation bar.
Click Manage Organization.
Click OAuth Applications.
Click the application to open its management page.
Click Regenerate Secret.
In the New Client Secret dialog, click Copy to copy the Client Secret, then select I have copied the client secret in a safe place.
Click Done.
The new secret is shown only once, and the previous secret stops working as soon as the new one is issued.
Send a POST request to the Regenerate OAuth Secret endpoint to issue a new secret. Replace {client-id} with your application id.
$ curl "https://api.vultr.com/v2/oauth/clients/{client-id}/secret" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}"
A successful request returns an HTTP 200 OK response with a fresh secret. The secret is shown only once and is stored as a hash on the server, so record it immediately. The previous secret stops working as soon as the new one is issued.