0

I'm having trouble with making outgoing calls using Twilio and I believe I skipped this step where I should submit a POST request to the Calls resource. I don't really understand what to do with this and I need someone to explain it for me since I'm just a beginner. And by the way, my Twilio account is just free trial. Does this have something to do as to why I can't make local calls?

Thanks.

bomalicay
  • 1
  • 1
  • 1
  • 3

1 Answers1

0

Twilio developer evangelist here.

Best place for you to start would be the Python making calls quick start. Follow that tutorial through and you should understand how to make a call with Python.

Though, as you say, the key is the POST request to the calls resource. It's easiest to perform this using our Python helper library and looks a bit like this:

from twilio.rest import TwilioRestClient

# Get these credentials from http://twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXX"
auth_token = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(account_sid, auth_token)

# Make the call
call = client.calls.create(to="+14085551234",  # Any phone number
                           from_="+12125551234", # Must be a valid Twilio number
                           url="http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient") # Just plays hold music

Let me know if that helps at all.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • Big thanks for your help. I am now facing another problem/error saying that my account is not authorized to call let's say a certain number. It also says that "Perhaps you need to enable some international permissions". What does this mean? My Twilio account is just free trial, do I have to upgrade or is there another way for me to make a browser-to-phone call using Twilio? – bomalicay Aug 15 '16 at 10:03
  • Take a look at your [international settings](https://www.twilio.com/console/voice/settings/geo-permissions) and make sure you have the countries checked that you want to be able to call. – philnash Aug 15 '16 at 10:05
  • But what if the country that I wish to check is not on the list? – bomalicay Aug 16 '16 at 02:07
  • Okay, I see it now. I need to upgrade my Twilio account in order for me to see additional countries on the list. Thanks for your help. – bomalicay Aug 16 '16 at 03:31