Janmajay
Janmajay

Reputation: 49

Twilio Send Message API Error 21603

I'm using postman to see the response format of send message api in Twilio. The Api that I'm using is https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages. I have entered the basic authentication parameters (Account_Sid and AuthToken as username and password) the json request format is

{
"To":"My Number",
"From":"Twilio Number",
"Body":"Hello this msg is from postman"}

But I'm getting error 21603 which states "A 'From 'phone number is required". Can you please tell me where I'm wrong. The messages are sent when using Twilio console.

Upvotes: 2

Views: 758

Answers (1)

Alex Baban
Alex Baban

Reputation: 11702

I can't see your Postman but, maybe this is what you're missing...

Click on the Body tab and make sure form-data is selected from the radio buttons.

enter image description here


Also if you go to Twilio docs page (https://www.twilio.com/docs/sms/send-messages) you can see the expected response if you click on the OUTPUT link (tab) that is located at the top right of the code sample.

enter image description here

Upvotes: 2

Related Questions