Linking multiple phones to a single twilio account - twilio

How does one link a single twilio number to multiple phones such that:
When new people text the twilio number, all of the phones linked to the twilio number receive the text.
When any one of the twilio phones respond to the text, it appears to the original texter that a single number is responding to them (irregardless of which of the twilio phones sends the text).
Picture texts work also in the way described in (1)-(2).
This is very similar to what Google Voice can do, except google voice sometimes doesn't work with picture texts.

You would need a backend of some sort, where you can store subscribers for a number, you can then handle in your language of choice, when you receive a sms perhaps containing the word "subscribe", you would then simply save that into your backend along with the number that the sms was received upon.
When receiving a sms that contains other text, you would then simply query your backend and find all the numbers that have subscribed to the number that you have just received the sms on, you would then simply use the Twilio api, to send the message to all the results from your backend query.
You could also allow unsubscribe functionality, where users only have to send unsubscribe to the number, and you would remove them from your backend or flag them as to not send to them again.

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 Response from a non-twilio number

When my friends text my Twilio bot, Twilio responds from another number which is not even Twilio's and is named "SMSInfo". I expect the bot to respond from the same number. I assure you that I haven't set any logic there that a response should come from another number. Also, note that "SMSInfo" is a number which often sends them verification codes for Fiverr or other things.
I just submitted a ticket to Twilio support and a bot automatically suggested me few articles. One of them solved the issue.
Sender ID change may occur when you send messages from a Twilio number
that is not local to your recipients, for example using a US Twilio
number to send SMS to Polish mobile users. This is often done to
comply with local regulations, or to ensure the highest possible
delivery rate for your messages.

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.

Enable twilio phone number to send sms

My Twilio number is not enabled to send sms. How can I enable my twilio number to send sms?
It is showing "Messaging is unavailable for this phone number."
Not every twilio number is capable of sending / receiving SMSs. Take a look into https://www.twilio.com/help/faq/sms/can-i-send-or-receive-text-messages-with-a-twilio-toll-free-phone-number
Also, if you follow the link they provide there, you can read the following
Mobile numbers
In most countries, mobile numbers are assigned to a particular range within the country’s telephone numbering plan so they can be easily distinguished from local numbers. They are often the only type of number in the given country that can be used for sending and receiving messages.
Note that currently all mobile numbers Twilio provides are only SMS-enabled. You can not make or receive voice calls using these numbers.
I faced the same issue with the "first one's on us" number.
Turns out, messaging capability depends on the type and country of the number.
I was automatically assigned a local number for my country, which did not allow messaging. If, however, you choose a custom number and go for one in the US, you are given SMS capability (at least I was just now).
If you already have your one free number assigned, you can release it and choose a new number for free.

how to associate received sms messages (via twilio) to specific user in my rails app

I'm making an app that sends text messages to a group of people and then people can respond to the text. I want to be able to record the response, know who sent it, and associate it with the user who sent the original message. I've gotten the sending working, and I've begun putting together receiving sms messages but i'm confused. If twilio sends a post request to my server with the from number and message, how will I know which of my users sent the original message?
what if two different users send a message to the same person around the same time? what's the best way to handle this? do I need a separate 'to' number for each of my users? seems like that would get quite expensive. also, if each user has multiple campaigns (messages), how would I associate a response to a specific campaign?
i'm building a rails app.thanks
You'll want to use a different Twilio number for each contact a user sends to. This will establish a unique mapping between the 2 mobile devices and a Twilio number. This allows you to forward incoming messages sent to the Twilio number back to the appropriately mapped mobile phone. You'll do the lookup on your mapping based on who the incoming message is From.
You won't need a Twilio number for every one of your users, but you will need a pool of numbers which is the maximum number of contacts a single person can make.
There is an article on Twilio's site which gives additional information:
https://www.twilio.com/help/faq/sms/how-can-i-have-users-send-text-messages-to-each-other-over-twilio

Resources