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.

Error 20003: Authentication Error – No Credentials Provided When Assigning a Flow to a Twilio Number

Issue

This article addresses the common issue where users encounter error code 20003: Authentication Error – No credentials provided when configuring a Twilio Studio Flow with a Twilio phone number. This typically occurs when the REST API URL is used instead of the required Webhook URL in the phone number’s configuration.

Symptoms

  • Incoming calls or messages to a Twilio number do not trigger the expected Studio Flow.
  • Studio Flow execution logs or Twilio error logs show:
    • code: 20003
    • message: Authentication Error – No credentials provided
    • HTTP status: 401

 

Cause

This error occurs when the REST API URL for the Studio Flow is used in the phone number’s configuration instead of the Webhook URL.

  • REST API URL: Used for programmatic triggering of Flows via API calls (requires authentication).
  • Webhook URL: Used to connect a Flow to a Twilio phone number or messaging service (does not require authentication).

 

Resolution

  1. Identify the Correct Webhook URL for Your Studio Flow
    The Webhook URL format is:
https://webhooks.twilio.com/v1/Accounts/{AccountSid}/Flows/{FlowSid}
  • Replace {AccountSid} with your Twilio Account SID.
  • Replace {FlowSid} with your Studio Flow SID.
  1. Update Your Twilio Number’s Configuration
    • Go to the Active Numbers section in the Twilio Console.
    • Select the phone number you want to configure.
    • Under the Voice & Fax or Messaging section, set the “A Call Comes In” or “A Message Comes In” webhook to the correct Webhook URL for your Studio Flow.
  2. Save Changes and Test
    • Save the configuration.
    • Test by calling or messaging the number to confirm the Studio Flow is triggered as expected.

 

Example

Incorrect (REST API URL):

https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions

Correct (Webhook URL):

https://webhooks.twilio.com/v1/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 

Additional Information 

  • The REST API URL requires authentication and is not suitable for direct assignment to a phone number’s webhook.
  • Always use the Webhook URL when connecting a Studio Flow to a Twilio number or messaging service.

Below you will find references to useful documents:

This article is intended for Twilio users configuring Studio Flows with phone numbers or messaging services and encountering authentication errors.

Have more questions? Submit a request
Powered by Zendesk