Can I retrieve the location of a phone number with Twilio? - geolocation

I'm working on a project that uses the Twilio API to send and receive text messages, but I'd like to be able to show the location of those cellular users in a table on my customer's dashboard.
In short, I'm looking for the data that shows up when you're shopping for a phone number on Twilio and it tells you it's from Newport Beach, California, etc.
Is there any way to retrieve that information from Twilio for a number besides one that is available for purchase?

Twilio Evangelist here. When Twilio makes a request to your server using a web hook, the SMS and voice will sometimes have geographical information.
FromCity
FromState
FromZip
FromCountry
But this information is not always available. There is no facility in the API to allow you to look up these outside of this context.
Hope this helps!

Related

Use own number to send SMS in Twilio

I have had a couple of customers wondering if they can use their own phone numbers to send out SMS using Twilio.
I am wondering if this is possible?
What are the carrier charges in this case and do I need to verify this number before enabling this functionality for an individual user?
The number you want to send messages from (or to) needs to be controlled by Twilio. However, it is possible to port your number from your current provider over to Twilio and thus give Twilio control over that number. This is possible, at least in some countries.
This support article here describes how this can be done for US numbers.

Twilio SMS to Multiple Countries

So I'm using Zapier to send text messages to people added to a MailChimp mailing list. A lot of the subscribers are from other countries so I'm just wondering how the interaction works with Twilio.
Will I need a separate number for each country?
Twilio developer evangelist here.
You don't necessarily need another number, Twilio numbers can send internationally (mostly, check the individual settings on the number to be sure, UK landline numbers, for example, can't send internationally).
However, receiving a message from an international number may not be a good experience for your users as they might expect a local number. Good news is that it is easy to build this.
You can create yourself an SMS messaging service. Messaging services are a combination of a number pool along with smart uses of the number pool. You can start your messaging service with one number and add others later. When you add more than one number the messaging service will geomatch between the people you are sending to and the numbers available in the pool, picking the best number for the user.
I'm not entirely sure how this works with Zapier, whether you can set a messaging service ID for your Zap. If that's not possible, you could use Zapier to send a webhook to something like a Twilio Function which you could set up to send the message.
Let me know if that helps at all.

Facing issue while sending SMS with Twilio Copilot

I am trying to work on Twilio Copilot. I have created the SID.I have also assigned a UK number .I need to send messages to UK, US and South africa for now.
I am currently facing problem is sending messages to US. Do i need to assign a seperate US number for it to work (Same for Other Countries)?
I am using C# Twilio 4.7.2 library.
Twilio developer evangelist here.
My guess is that you have a UK landline number. That is a number that currently supports voice and messaging and starts +441, +442 or +443.
UK landline numbers cannot currently send international SMS.
If you still want to use a UK number to send international messages, you can get a UK mobile number, which will start +447, though currently these numbers do not support incoming voice calls.
Best practice for sending international messages is to try to use a local number to send them. When you are using Copilot it will automatically geomatch the best number to the location you are sending to.

Is the right way use Twilio for verifying mobile phone numbers?

I want to verify mobile phone numbers. The mobile phone numbers can be from anywhere, I mean any country. My idea is to send an sms with a code, and then ask for that code.
I am not sure if Twilio is a correct choice for doing that, because I do not understand if with a phone number from Twilio I am able to send messages around the world. I am also not sure about the costs of sending messages.
Is Twilio right for this or should I look for another service?
Thanks
Twilio developer evangelist here.
You're totally on the right track. With a Twilio number you can send SMS messages to over 200 countries, and get local numbers in over 40 countries. Have a look at this FAQ for more information.
Have a look at this blog post where we show you how to use Twilio to verify phone numbers on the way you asked.
You will find pricing information in this page, and it will vary slightly from country to country.
Hope this answers your question.
You can also test other similar verification service.
www.foneverify.com is one such service providing verification across the globe.
You can try our services by signing up for free.
Disclosure: I am the product manager of foneverify.
Thanks,
Shivam

How to get twilio phone rental rates via API

I'm writing an application that needs to rent numbers via the API, but I need to know the rental rates of the phone before I rent a number. Is this possible via the API? I saw a lot of info on voice rates and sms rates via csv files etc. but nothing on the rentals.
Twilio evangelist here.
You can find a pricing sheet for phone numbers here:
https://www.twilio.com/resources/rates/international-phone-number-rates.csv
Its linked off of the Voice page on twilio.com:
https://www.twilio.com/voice/pricing
Hope that helps.

Resources