Send SMS Message to user - Response gets me a SID (SMf57da38aeceXXXXXXdb393a0f23d2) which i store in database.
Clients replys to SMS message - How do I get SID from step 1?
Most other SMS API's I've dealt with send back a reply_to parameter. I've looked through lots of Twilio docs but I'm struggling to find the answer.
Thanks,
Twilio evangelist here.
Each individual message is an atomic unit, as this is how text messages are meant to be. However, there are still things you can do to make those messages relate to each other. One way I see a lot of people doing is by relating messages to the phone number, and then ordering them by the date/time stamp.
This will work just fine 9 out of 10 times, and will always guarantee you are following a chain of messages on the correct order.
Let me know if you have a specific situation where such approach wouldn't suffice.
I'm a Twilio developer evangelist too, hello!
I have another idea that might help you. You can actually set a cookie to tie messages together over time. There's a guide on getting started with that in C# here.
Let me know if this helps.
Related
I have been looking at whether I can use RabbitMQ to assist in sending bulk emails from a console application (C# ASP.NET CORE).
I have had a good look through their website but can not find a specific tutorial on the use of RabbitMQ for bulk emailing.
https://www.rabbitmq.com/getstarted.html
Can anyone point me in the right direction?
Thank you,
Aaron
From what I've read on their site & comments here it would seem the only sensible implementation might be to use the producer with my loop, then write a consumer that will send the emails and in the case of an application failure this would allow the messages to continue - but this wouldn't give me reports on whether the emails themselves have delivered/failed - nor would it provide robustness for the emailing part (inside the consumer) of the application
This is reasonable enough and yes, you will have to implement parts of this system yourself, and test it to ensure reliability meets your expectations. You should read about these RabbitMQ topics:
Durability
Persistence
Message acknowledgements
Publisher confirms.
You may also be interested in this plugin.
And finally, please only send email to people who want to receive it, and give people an unsubscribe option.
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.
I have an application where I use Twilio to send an SMS to a list of phone numbers which is triggered by an event.
This works fine.
Now, I need to extend this feature such that, if any one of the recipients do reply to the original message, My application needs to capture the reply message body and forward it to all others in the list.
The problem is as per our business rule, a phone number can be a member of multiple groups and the reply body should only be forwarded to the group where the original message was sent.
So, Is there a way to associate original SMS sent and a reply SMS received by a Twilio number?
If yes, can I use that parameter in the webhook configured in Twilio account?
If No, Is there any other option in Twilio that I can make use of for completing my functionality.
Twilio developer evangelist here.
If you are just using one number to send all of these messages, then the answer is no. As you'll notice if you go to your SMS application on your phone, there is no way to respond to a particular message. This is a limitation of SMS messages in general.
However, if you were to provide a telephone number per group that the users is signed up to receive messages from, then when your user responds to a message it will go back to the group's number and you can look that up on the incoming request. Then you can fan that out to the rest of the group signed up to that number too.
Let me know if this helps at all.
We are creating a bulk SMS messages sending Web application using ASP.NET web Forms and C#.
There could be multiple logged-in users, sending bulk (1-5000) messages to their clients.
As per initial R&D we have selected to use Twilio's SMS API for this purpose.
But I am anxious about potential timeout issue while sending messages and saving response in loop, Also does Twilio accept multiple request instances?
Twilio has a limit or 1 message per second Then we can only send 3600 messages in one Hour, that would be a limitation.
Twilio provide Rest API but we are not familiar with MVC, so REST API idea has been dropped.
Please suggest other alternative, best practice and strategy to accomplish the task.
------------------UPDATE------------------------
Short Code Rest API Documentation
https://www.twilio.com/docs/api/rest/short-codes
Twilio Sending Documentation
https://www.twilio.com/docs/api/rest/sending-messages
Request Data From Twilio Documentation
https://www.twilio.com/docs/api/twiml/sms/twilio_request
With those volumes, there is no way you are going to be able to get by without using an SMS shortcode. Even if you could technically get it to work with a regular number, I suspect you would be shutdown as a spammer pumping out so many messages on a regular phone number.
A short code will let you send at at least 30 messages per second (1800/minute), and supposedly they can up that for you if you have a justified need.
https://www.twilio.com/sms/shortcodes
and this:
https://www.twilio.com/help/faq/sms/can-my-twilio-sms-messages-be-blacklisted-as-spam
Can my Twilio SMS messages be blacklisted as spam?
Recipient carriers always reserve the right to filter out messages
from certain numbers, and routinely do so to protect their users from
spam.
If you’ll be sending SMS messages as part of a bulk campaign (with 30
or more identical or similar messages going out within a few minutes),
we discourage you from using regular 10-digit numbers. Instead, we
highly recommend using an SMS short code.
I want to write an app that sends an SMS to users, and when the recipients texts back, I receive that response, including the originating phone number, and my program can react to that response.
I've googled "Interactive SMS" but didn't find anything that was clearly a fit. Has anyone else done this, got any recommendations for a paid service that provides this kind of functionality?
Alternatively, do you have any other recommendations for how to build this service into my app, which will probably be written in C#?
Find an SMS service provider that gives you an API you can use (e.g. an HTTP API). Then read their documentation.
You need to learn about SMPP (short message peer to peer) protocol. Is the protocol usually used to communicate with carrier's SMSC (Short Message Service Center). Here's a blog entry summarizing the actual status of some C# SMPP libraries. If you don't want to use an existing .NET library, you can always write your own. SMPP is not a very complex protocol after all.
An alternative might be attach your application to a cell phone, and if that cell phone provides you with an API, use it to send and receive texts. The problem here is that it won't scale if your application expects to send and receive hundreds of thousands of text messages per day.
Yet another alternative will be to use a CARRIER AGGREGATOR company that provides you with an API for your application. There are some out there, but I don't know if they will be able to offer you a short code and the possibility to receive texts in your application. Depending on the market you are targeting, you should do a little bit of research on how other VAS companies do it over there.
You can use the TextMarks API for this. It's REST-based and super simple to use. So simple that Harvard uses it to teach new students how to use APIs. Docs here.
Messages routed to you from a user are called MO messages (Mobile Originated) and most 3rd party SMS gateways implement simple api's whereby they will simply HTTP post you incoming messages (including the originators msisdn and home network).
For example http://www.clickatell.com/products/two_way.php
Search the site for SMS Gateways for others.
Check SMS Studio - guys have done a lot on that subject and maybe you can use of-the-shelve software or customize it a little to suit your needs.
If not, at least you can find some good keywords for googling.
Anyway, you will have a choice - either go with SMS gateway, or for low volume SMS traffic, you can go with GSM Modem and handle it manually, though it's not recommended.
I am just now beginning to research this, and so far haven't come up with much. So, I'm hoping you guys can help me, or point me in some sort of direction.
I am in a situation in which I need to somehow be able to detect a failed email delivery and/or bounced-back email. Then, I need to be able to sent out a notification email describing this failure, as well as include some other, specific information in the notification email as well.
At the moment, I really have no idea how to do this. The email system we have now involves some C#.NET managed code, which send the email via an SMTP Exchange server. So, my initial thoughts are that I might be able to use email header information to accomplish this, but I'm not terribly family with all of the available email headers. I am also not at all opposed to finding and using some sort of third-party solution, but again, I'm not familiar with any such solutions or solution providers, and so I am very open to suggestions there too.
Are you using the SMTPClient class? If so, there's a SmtpFailedRecipientsException that would help you accomplish what you need.
Examples and further information given here:
http://msdn.microsoft.com/en-us/library/system.net.mail.smtpfailedrecipientsexception.aspx
Not sure if you want to download messages from an IMAP server or a POP3 server. If it's the case, you may want to check out the Ultimate Bounce Inspector component. It also let you process EML files.
You can use PostMark which allows you to programmatically process bounced emails.