I am exploring Twilio. Successfuly enabled sms sending but have troubles with programmable voice callbacks. As I understand from the developer console https://www.twilio.com/console/dev-tools/api-explorer/voice/calls (POST section) all I need to do is to run this code to receive callback:
curl 'https://api.twilio.com/2010-0401/Accounts/my_account/Calls.json'
-X POST \ --data-urlencode 'From=Twilio_generated_phone_nuber' \ -u
some_hash:[AuthToken] --data-urlencode 'To=MY_NUMBER'
But I get only this response:
{
"code": 21215,
"message": "Account not authorized to call +MY_NUMBER. Perhaps you
need to enable some international permissions:
https://www.twilio.com/user/account/settings/international",
"more_info": "https://www.twilio.com/docs/errors/21215"
}
Pay attention please: I had this error previously while configuring sms sending. I resolved this after enabling all countries including my own from this list https://www.twilio.com/user/account/settings/international . After that sms function works fine. For now I can't get callbacks, and error message recommend me to go to the same page (international) and enable permissions but I have done this already while configuring sms.
I thought that sms and callbacks products have different pages for configuring countries permissions, but no they haven't. Well at least I didn't find it :)
Help please! Thanks for checking the question.
Twilio developer evangelist here.
There is indeed a page for international permissions for voice calls too. You can find it here: https://www.twilio.com/console/voice/settings/geo-permissions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With