Is there a way create a group SMS with the twilio API, just like how I can send an SMS to two contacts on my phone and have the conversation saved in one chat log?
Basically if I have an SMS sent to a twilio number and another person could twilio see that it was sent to them as well as the other person?
It is not possible to send one message to multiple recipients with a single request. you can send only one single SMS with one request. So you can iterate through the array of phone numbers to send SMS.
Related
I am dev'ing a project where someone creates an event, and a group of people get an sms message inviting them. I want the recipient to be able to rsvp via sms. So if they respond "yes" I want to know what event_id they are responding to0.
I am passing a:
"statusCallback" => "https://cbd5-67-183-175-137.ngrok.io/receive-note/12345"
(not a real event id, just testing)
I don't care about the message status at this point, just if a response comes in. What parameter can I pass to the create message call that will allow me to dynamically track what event this invite was for? Is it a webhook or some kind of grouping?
Twilio developer evangelist here.
There is no concept of replying to a specific message in SMS, messages are just chronological.
The statusCallback URL for an SMS will only report on the status of the message you are sending to the end user, from queuing the message to be sent all the way through to delivery.
When a user sends an SMS to your Twilio number it triggers the incoming message webhook.
The incoming message webhook has no connection to an outbound message at all. So you will have to work out what message you think the user is replying to. A simple way to do this is to assume that they are replying to the last message you sent to them or the last event invite.
You are probably already considering what might happen if a user is sent invites to more than one event at the same time. How can you distinguish which event they are replying about. You have a couple of options here.
You can only ever send one SMS about an invite at a time, up until a timeout of sorts. That way, when a user replies you can always assume it's about the latest message.
Or, you can send invite message from different Twilio numbers. If you then store the outbound number with the invite you can look up replies based on the user's number and the number they replied to and calculate which invite they are responding to. To achieve this, you need more than one Twilio number, but you should only need as many numbers as the maximum estimated number of events a user might be invited to at one time.
Finally, you could ask the user to include an event ID or similar in their reply which you can then parse out, but this is likely to be a difficult ask of users.
This exists in SendGrid and is very useful. I don't understand how it's not implemented in Twilio.
How do you import contacts into Twilio SMS (phone numbers for texting)? This is so simple yet nothing in this app I can find lets you import contacts, please help!
Also how do you know the phone number you have for a contact is a Whatsapp number?
Is there software that identifies the Whatsapp numbers from a list of phone numbers that are mostly landlines but a few are cell or other type numbers that are registered on Whatsapp?
Twilio developer evangelist here.
Twilio does not store your contacts, so there is no way to import contacts. When you want to send an SMS message you provide the number you want to send the message to, the Twilio number you are sending from and the body of the message. There is no need for a contact.
Within Twilio Notify, which is a way to send bulk notifications, you can create Bindings. A Binding is a resource that binds an identity to an address and an address type, for example an phone number for an SMS or an APNS device token for push notifications on iOS. Once you have a number of bindings stored, you can send a notification to them.
Also how do you know the phone number you have for a contact is a WhatsApp number?
When using the WhatsApp API to send messages, you must receive explicit opt-in from your users that you can contact them via WhatsApp. So, you should not try to search through existing contact numbers to find out whether they are also a WhatsApp number, instead, you should get your user's consent to send to their WhatsApp number and record the number then.
Im planning to build a console application. My plan is to build a subscription base thru sms. For example text SUBSCRIBE to 2600 then after application received sms the user will become subscriber. It will send news, announcement, events etc to user with senderID sms.
Is it possible in Twilio ? receiving sms in shortcode and notifying with sender id. Is it possible having 2 type of number in 1 account ?
Twilio developer evangelist here.
You can absolutely use more than one type of number across an account, from local, national, short code and toll free numbers as well as using alphanumeric sender IDs in supported countries.
I have purchased two numbers from twilio one is for UK and the other one is for US.But when I try to send an SMS to that number from an Indian number.I get the response on a different thread.I want to get a response on the same thread so that my bot and the user have conversation on the same thread
Twilio developer evangelist here.
I'm afraid that in the Indian market we are currently forced to work under some restrictions. One of which is:
The sender IDs are changed to the format “XX-NNNNNN”
The sender IDs are altered before SMS messages are delivered to end
users. End users are very likely to see a sender ID composed of 2
letters followed by 6 numbers instead of the Sender ID you specified.
Due to the sender ID change, SMS recipients are unable to send a reply
back to your Twilio phone number.
Unfortunately that means that bot style conversations aren't currently possible in India.
I'm using the code from the documentation to send a SMS to a mexican number and it works.
But the sms is being sent from another phone number other than the one I purchased. I want to be able to send back a reply and visualize it on the Twilio Console. I have tried sending a sms directly to my number and I can see it there, but if I send a reply to the phone number that sent me the sms a get nothing. How can I send an SMS from the number I purchased?
Twilio developer evangelist here.
It is likely that you are sending SMS messages to a country that doesn't support maintaining the sender ID. Check out the SMS guidelines for the country you are sending to to see if this should be supported or not.