Objective
This article explains how to create an OAuth application so your own software can call Twilio's organization APIs securely with a short-lived access token, scoped to only the resources you allow.
Product
Twilio Organizations
Environment
Twilio Console
User Account Permission/Role(s) Required
OAuth applications create permission. Without it, the Create OAuth application button is not shown.
Procedure
- In the Twilio Console, select Settings in the left sidebar.
- Select Organization settings, then Organization API access.
- On the OAuth applications tab, select Create OAuth application. The Create an OAuth Application wizard opens.
- On Application details, choose a grant type:
- Client credentials, lets a trusted application request an access token directly using its own client ID and secret, with no user involvement.
- Authorization code, the application receives an authorization code after user approval, then exchanges it for an access token.
- Fill in the details for the grant type you chose:
- Application name, required, at most 32 characters.
- Application description, optional, at most 140 characters.
- For Authorization code also complete Company name (required, at most 64 characters), optionally Image for the application, Homepage URL, Terms of service URL, and Redirect URLs (required, separate multiple entries with commas).
- Select Next to reach Access settings. Under Select OAuth Scopes, tick the permissions this application should have.
- Select Next to create the application. The Credentials step shows the client ID and the client secret; for an Authorization code application it also shows the authorization URL.
- Copy the client ID and client secret and store them somewhere safe, then tick the acknowledgement that you have saved them.
- Select Finish. You are returned to the OAuth applications list.
Additional Information
- The client secret is shown only once, at creation. If you lose it you must rotate the secret to get a new one.
- You must select at least one permission. Otherwise the wizard shows "Please select at least one permission".
- Every Redirect URL must be a valid URL. If one is not, the wizard shows "One or more Redirect URLs are not valid. Please check and try again."
- An application image must be a raster image no larger than 3 MB.
- You can have up to 25 OAuth applications at once. Beyond that you must delete an application before creating a new one.
- Select the cancel action at any point to leave the wizard and return to Organization API access.
- If the creation fails, "Failed to create OAuth application. Please try again." appears.
This content was generated by AI and reviewed, edited, and verified by a human.