Aizuddin Badry
Aizuddin Badry

Reputation: 464

Twilio Outgoing Calls Failed Code 31002

I keep getting error code 31002 in Twilio without know how to debug. I use client JS and Ruby on Rails as my backend.

First of all, what I'm going to do is to create apps that can make voice call from my browser to mobile phone.

Please see image below for the error I got on my browser:

enter image description here

Upvotes: 3

Views: 3776

Answers (2)

Michael Johnson
Michael Johnson

Reputation: 1

I faced this error before, because I used wrong webhook url.

In this case, twilio can't find your backend and the outgoing call fails.

Hope this help you.

Upvotes: 0

Wen
Wen

Reputation: 1230

The 31002 error code is returned by Twilio API. Here are some troubleshooting steps to rule out basic errors:

  1. Check the debugger page on your Twilio console https://www.twilio.com/console/runtime/debugger. If you don't see the call in the log, it's likely that you are looking at the wrong Twilio account/subaccount/project. Project is on the left of the top action bar, subaccount is on the right. twilio action bar

  2. Go to the console dashboard https://www.twilio.com/console, check if your application is using the correct TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN

  3. Go to Programmable voice https://www.twilio.com/console/voice/twiml/apps, check if you are using the correct application SID
  4. Go to Phone numbers https://www.twilio.com/console/phone-numbers/incoming, check if you are using the right number.

My experience, the rule of thumb is, if you don't see any activity on the Twilio debugger page, you are probably using the wrong SID/token/etc.

Upvotes: 5

Related Questions