Set Reply To In Twilio SMS - sms

When we send sms from twilio then we want to set reply to phone number.
So if they reply to the outbound message then incoming message will be received by agent not the twilio number form which we are sending sms.
Thanks,
Rajendra

Twilio developer evangelist here.
I'm afraid there is no concept of a "reply-to" phone number in SMS messages. The recipient of a message can reply to the number that sent the message to them.
If you are looking to try to connect users directly through a Twilio number, I recommend you check out the Twilio Masked Number tutorial (that links to the PHP version, but there are other language versions of the tutorial). It will show you how to use a pool of numbers so that you can maintain a relationship between an agent and a user.
Let me know if that helps at all.

Related

Twilio SMS delivery to DND number

I am sending SMS using Twilio API. During testing i found that it sometimes delivered message to the phone number but does not sends all the time. This is the case of DND activated numbers(Do Not Call List).
I knew this is because of Sender routing done by Twilio. When Twilio sends SMS using a number(only numeric sender-FROM), i received the message, but when it sends message using some alphanumeric sender(like DM-044138), it does not delivers the message.
Now my question is do we have any access to change this ? Can we set something that could guarantee the delivery even for the DND numbers ?
Any help would be highly appreciated.
Your problem is you are sending it to India.
Please review the following.
This feature is only available when sending messages to supported countries
As you can see from the list below India is not a supported country.
https://www.twilio.com/help/faq/sms/what-countries-does-twilio-support-alphanumeric-sender-id

Can i send sms using twilio as though coming from my verizon number

Can user send sms from my app to friends using twilio . End user should get sms from the user, rather than a twilio assigned number. Is that possible ?
Twilio evangelist here.
Unfortunately no. Currently Twilio only allows you to use a Twilio phone number as the sender ID when sending text messages.
Check out this FAQ:
https://www.twilio.com/help/faq/sms/can-i-specify-the-phone-number-a-recipient-sees-when-getting-an-sms-from-my-twilio-app
Hope that helps.

can't Reply to Message from twilio

I am new to Twilio API.I have trial account and I have sent Message using Twilio Rest API successfully and received message from number i.e Message as:DM-062107 and body :- Sent from your Twilio trial Account-Hello.
Now I can't able to reply this message.can any one help me to how I can reply to this and how I know that message is received.
I have contacted to Twilio technical support for same problem and get the response. Check the reason why reply option is not enabled:
Although Twilio supports sending outbound messages internationally using toll-free numbers, your Indian number may not support sending inbound messages to US toll-free numbers. I will recommend checking with your mobile carrier to see if sending messages to US toll-free numbers is supported. If not, I will recommend using a regular US number instead of a US toll-free number and kindly retest.
Twilio Evangelist here.
So, to reply to message you just send a normal SMS from your phone to the number. The way Twilio handles this is using a 'webhook'.
If you log into your Twilio account, click on the 'Number' tab, you'll see you have a telephone number there (the same one you sent an SMS with):
Once you've clicked on the number, you'll see a screen with some other details:
Here you can configure your webhook. This is basically a URL that Twilio will send your message to. So if you configure that to point to the URL of some application you have written, you'll receive an HTTP Post or Get request (you can configure which) with the contents of the message, who it is from, etc.
You can then reply to this message with Twiml, which is just XML:
<Response>
<Message>
This is the message that is sent in reply!
</Message>
</Response>
And using this you can build up a conversation!
There are a lot of details on Twilio's website with quick starts etc. There is even a video that talks it through.
Hope this helps.

Twilio SMS verify destination phone numbers and verification ID

I have two questions.
I am creating a website for a client I am trying to code in Twilio SMS tools for end users and for management. I have the request and response tools built so I am all set functionally. So the questions are:
A. Can I send SMS message to any phone number OR does every number I send an SMS have to be added to twilio and verified before I can freely send SMS? It would be nice if I could just collect my phone numbers from the end users and free them from the pain of the verification process.
B. If I must verify end users then can I send SMS messages to them with their verification code? Right now an automated message call is sent to the phone number that wants SMS updates and you have to key in a six digit verification code....AND then you can send that person SMS messages. The phone call is kind of awkward.
A. Once you have a regular Twilio account, you can send an SMS to any phone number. However, some phone numbers (e.g., most landlines) cannot accept an SMS. If you try to send an SMS to those numbers with your cellphone, you will probably get a message back from the carrier that the number cannot accept SMS. However, Twilio will report success in sending the message, even though the message obviously cannot be sent to that number, and you will get no indication that the message did not go through.
But, no, there is no need to specifically add the numbers as verified for them to work with Twilio.
You can use a service like https://www.carrierlookup.com/ (which Twilio told me about) to check if a phone number can receive SMS messages.
B. -- you do not need to verify end users through Twilio, although I do think there are restrictions on a Twilio trial account that will be removed once you have a paid Twilio account.
Twilio evangelist here
Once you upgrade, you can send a message to any phone number. While you are using a trial account, you have to verify a number in order to send a message to it. More info about how a trial account works is here:
http://www.twilio.com/help/faq/twilio-basics/how-does-twilios-free-trial-work
Hope that helps.
Regarding verification: Twilio has a service that allows verifying phone numbers, including format, carrier, if it's mobile or landline, etc: https://www.twilio.com/lookup
API Docs: https://www.twilio.com/docs/lookup/api

How track responses for an SMS to multiple recipients with the Twilio API?

I would like to send a text message survey (eg. "How happy were you with X service? Reply 1 for satisified, Reply 2 for not satisfied") to multiple recipients. From the responses, I would like to create a report on the recipients that responded 1 vs the ones that responded 2. What is the best way to do this with the Twilio API? Does my app need to store the results from my incoming SMS message or does Twilio store these so I can query the results? If the former is the case and TwiML is involved, how do I parse the response and store the result? Thanks!
** Disclaimer: Twilio evangelist here **
Chirag:
So it sounds like you have two requirements here:
Use Twilio to send outbound text messages to different recipients
Capture a users reply to that message
For the first requirement, you can start by going to Twilio.com and signing up for a new account. Its free to start and we give you a Twilio phone number you can use to start to build your app. Once you have the Twilio phone number, you can use the REST API to start sending outbound text messages from that Twilio phone number. We have a quickstart that shows you how to do this:
http://www.twilio.com/docs/quickstart/php/sms/sending-via-rest
Note that this link goes to the PHP sample, but you can use the drop down at the top of the page to pick from other stacks like .NET, Java, Python or Ruby.
Once you've sent an outbound message you need to capture the replies to that message (your second requirement). Twilio uses something called a webhook to notify you about incoming SMS messages.
A webhook is basically a URL exposed by your application and associated with your Twilio phone number. You can configure the URL associated with your phone number in the Twilio dashboard.
Each time we receive an incoming SMS message on your Twilio phone number, we will make an HTTP request to that URL. As part of that HTTP request we send along metadata about the inbound message like the phone number that the message was sent from and the Body of the message. The full list of parameters we send is here:
http://www.twilio.com/docs/api/twiml/sms/twilio_request
Now your app can pull those parameters out of the request and do whatever it wants with them. Since we already are sending the body of the message as we receive it, Tims suggestion of tracking the responses based on the From parameter and storing the message body in your own database is a good suggestion.
This quickstart shows receving an incoming text message, grabbing the From parameter and then responding by sending back from TwiML:
http://www.twilio.com/docs/quickstart/php/sms/replying-to-sms-messages
In your case, if you don't want to reply to the incoming message, just omit the TwiML response.
Hope the helps. Lets me know if you need more info.
Devin
Track the responses using the From parameter (and using Body to identify the selection). Yes, Twilio stores those messages, and you could query the API - but it's likely better to just store it in your own database.

Resources