Hi I was wondering if someone could help me ,I am trying to use twilios' rest api and im running into some trouble. MyAccountIdSid,mySid and phone numbers are filled in in the actual request,Is there something i am doing wrong, I get Your "AccountSid or AuthToken was incorrect" . Can someone show me the correct way to make this request for sending an sms please. I am trying to send a text message Post Request Url i am using :
https://api.twilio.com/2010-04-01/Accounts/MyAccountIdSid/Messages.json
{
"account_sid": "MyAccountIdSid",
"api_version": "2010-04-01",
"body": "HelloWorld",
"num_segments": "1",
"num_media": "1",
"date_created": "Wed, 18 Aug 2010 20:01:40 +0000",
"date_sent": null,
"date_updated": "Wed, 18 Aug 2010 20:01:40 +0000",
"direction": "outbound-api",
"error_code": null,
"error_message": null,
"from": "+353xxxxxxxx",
"price": null,
"sid": "mySID",
"status": "queued",
"to": "+353xxxxxxxxx",
"uri": "/2010-04-01/Accounts/MyAccountIdSid/Messages/mySid.json"
}
Twilio developer evangelist here.
If you're copying it from here, be aware that the first part of it is the request, and the second is the response, so what you're trying to send to Twilio is the response, hence why it's not working for you.
What you need to send to Twilio is the following:
I've created a quick screeencast showing you how to do that with postman 2. Hope it helps you.
Note : Enhancement of Marcos Placona's Answer
In the Authorization section, set 'AUTH TOKEN' in 'password' field. You can find 'AUTH TOKEN' just below Account Summary.
https://www.twilio.com/console
https://www.twilio.com/docs/api/errors/20003
'Authenticate using your Account SID as the username, and your Auth Token as the password.'