0
votes

I am trying to make calls using REST API and the Language I am using isn Apex.However,it is throwing me error saying 'Url parameter is required. For more information, see '

I am using Endpoint URL as follows :-

https://api.twilio.com/2010-04-01/Accounts//Calls.json?Url=http://demo.twilio.com/docs/voice.xml

If you see I am adding the Url param to the endpoint,still it is throwing me an error.

I am able to send SMS through Rest API,the issue is only when I am making calls.

Please suggest.

Thanks

1

1 Answers

0
votes

Url must be POSTed to the API, you are now sending it as a GET parameter.

Change your code so that it does a POST instead of a GET and sent the Url parameter as a POST variable.

(see http://www.twilio.com/docs/api/rest/making-calls#post-parameters)

Also you left out the {AccountSid} in your URL, that's required as well. Of course you may have left it out because you don't want it publicly visible on SO, but I can't from here that that's your reason ;)