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 400: "Bad Request" When Using the HTTP Request Widget

Issue

With Twilio Studio, Flows can trigger other Flows by several mechanisms, including a Run Subflow widget or by making use of the Twilio API/SDK to trigger a Flow Execution in a Twilio Function with a Run Function widget.

However, using a Make HTTP Request widget to POST to another Flow URL results in a 400 Bad Request error if given a Request Body containing To/From addresses, e.g. "To=+1...&From=MG...". How can this error be avoided?

 

Product

Twilio Studio

 

Environment

Twilio Console

 

Resolution

Instead of specifying the Request Body, enter the "To" and "From" fields as HTTP Parameters.

You will want to ensure:

  • The Request Method is set to "POST"
  • The Request URL is the Flow URL to be triggered, e.g. "https://studio.twilio.com/v2/Flows/FW.../Executions"
  • The Content Type is set to "Form URL Encoded"
  • "Authenticate With Twilio" is checked

Your receiving Flow should include a "REST API" Trigger (Start) widget to handle the request from the requesting Flow.

 

Additional Information

  • You can find more details on configuration for the Make HTTP Request widget here.
Have more questions? Submit a request
Powered by Zendesk