Postman Twilio Rest Api

北战南征 提交于 2019-12-03 05:36:22

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:

$ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/AC36b9a6be2f98274fe61d15b63aabf1e0/Messages.json \
    -d "Body=Jenny%20please%3F%21%20I%20love%20you%20<3" \
    -d "To=%2B15558675309" \
    -d "From=%2B14158141829" \
    -d "MediaUrl=http://www.example.com/hearts.png" \
    -u 'AC36b9a6be2f98274fe61d15b63aabf1e0:{AuthToken}'

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.'

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!