0
votes

I'm technical, but not experienced in coding and could use some help. I need to create an http request from Twilio studio. I am setting up a phone survey for my client and I need to log both voice and number inputs from the call to a database. I already have the database set up externally. It logs responses with an http request from CLI curl. I'm using the following curl request successfully:

curl --data "q=1 -X POST localhost/test.php

When I try to duplicate the same curl request using the http request widget (no http parameters), I only get error 500 back. By the way, I know it's collecting the data correctly with the flow because I've had it collect and then read back to me successfully.

Twilio studio http request.

I have tried adding http parameters instead of putting them in the body as well. Nothing I try works. My guess is that I have a fundamental misunderstanding of http requests and thus can't duplicate it in Twilio.

Any help you could give me would be great! Thank you!

1
I assume the URL you provisioned in the Stufio HTTP Request widget is reachable from the public Internet?Alan
Yes, it's reachable from the public internettpeabody

1 Answers

0
votes

When you add http parameters instead of putting them in the body (see the capture below)


enter image description here

there is a big red "Save" button on bottom left corner, and a gray (hard to see and easy to miss) "Save" link on the right, above the trash bin.

The gray "Save" link needs to be clicked when adding each name/value pair of the parameters.

The red "Save" button is to be clicked at the end when you're done with the http widget.