Pratyush
Pratyush

Reputation: 3

Twilio API POST request

I was wondering if someone could help me. I am trying to use Twilio's REST API and I'm running into some trouble.

I tried to send data through Postman but I get an error message:

{
    "code": 21603,
    "message": "A 'From' phone number is required.",
    "more_info": "https://www.twilio.com/docs/errors/21603",
    "status": 400
}

But I have given all the credentials correctly:

screenshot

Upvotes: 0

Views: 898

Answers (2)

Yasin Hajilou
Yasin Hajilou

Reputation: 329

I think you must use another way to send data, for example, use 'raw' instead of 'form-data' and write in the body:

 { 
    "To": "45544" , 
    "From": "44444" , 
    "Body": "postman"
 }

and I suggest to you use another chooses, if doesn't work.

Upvotes: 0

Manadip
Manadip

Reputation: 140

Try sending body using "x-www-form-urlencoded" instead of "form-data"

Upvotes: 2

Related Questions