SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How do I rotate the client secret for an OAuth application?

Objective

This article helps you replace an OAuth application's client secret, for example after a suspected exposure or as part of routine credential hygiene, while giving your application a grace period to switch over.

 

Product

Twilio Console

 

Environment

Twilio Console

 

User Account Permission/Role(s) Required

An account role that allows you to rotate an OAuth application's secret. Without it, the Rotate secret action is not shown.

 

Procedure

  1. In the Twilio Console, select Settings in the left sidebar.
  2. Under Account settings, select OAuth applications.
  3. Select the application whose secret you want to replace.
  4. Select the Credentials tab. It shows the application's SID and, under Secret rotation, the Rotate secret action.
  5. Select Rotate secret.
  6. In the Rotate Secret dialog, set the Grace period in days. The default is 1 day, and setting it to 0 invalidates the old secret immediately.
  7. Select Yes, rotate secret.
  8. The You have rotated your secret! step shows the new secret. Copy it and store it safely.
  9. Select the checkbox confirming you have saved your Client ID and Client secret in a safe place, then select Done.

 

Additional Information

  • The grace period must be between 0 and 30 days. Other values are rejected with "Grace period must be between 0 and 30 days".
  • During the grace period both the old and new secrets work, which lets you deploy the new value without downtime.
  • Applications registered as a public client have no secret, so the Secret rotation section is not shown for them.
  • Select No, cancel to close the dialog without rotating.

 

This content was generated by AI and reviewed, edited, and verified by a human.

Have more questions? Submit a request
Powered by Zendesk