I use twilio to send sms messages but in the message I am trying to create it is a very long url and therefore won't send in 160 characters so twilio cuts the message off and url doesn't work.
If I use the automated twilio Shorten SMS the same thing happens.
I assume there is a limit to the amount of characters Twilio will send and I believe it cannot join concatenated messages in Australia from Twilio.
Edit: as of August 2019 Twilio has discontinued its URL shortening service. You should consider using a 3rd party service that allows you to set a unique base URL.
Sharing a static base-URL for a link shortener can cause unexpected carrier filtering issues with U.S. 10-digit long codes (short codes are not carrier filtered). Carriers sometimes spam filter messages by content, and the base-URLs of the links being shared appear to be one way that they categorize spam.
Twilio is working on a next-generation URL shortener that provides randomized base URLs as an add-on to a messaging service. If you are interested in this functionality contact Twilio support.
You should check to see that URL shortening is explicitly enabled in your account before attempting to send messages.
https://www.twilio.com/console/sms/settings
Related
I have a web application that sends verification codes to users through clickatell. Nearly all users are in the US, and those work fine, but I have about 5 with international phone numbers who receive no texts.
I have a page set up to accept delivery notifications and dump them into a log file.
If I send a message to a US number, like +18161234567 I get a notification like so:
integrationName=MyIntegration&messageId=*******************&clientMessageId=&to=18161234567&from=1##########&status=DELIVERED_TO_GATEWAY&statusDesc=DELIVERED_TO_GATEWAY×tamp=1502911816000
But if I send a message to a non-US number, like +393921234567, I get no response from the clickatell server at all. It's like they don't even get the request. The phone number is the only difference between the two requests.
I have a case open with clickatell support but they have been less than insightful so far, just telling me they need a messageID or error code to investigate further, but since I get no response, I have none to give them.
Has anyone else experienced this or have any ideas I can use to troubleshoot?
We have a two-way number because that is required for sending texts in the US. However, clickatell notes on the two-way settings page that
If the country does not support two-way messaging, Clickatell will not submit the message (you will not be charged for messages that aren't successfully submitted)
I can't seem to find a list of countries that do or do not support two-way messaging. Do I need to add a separate integration without two-way messaging to support my international numbers?
UPDATE: Upon further research, my international users are in 3 countries. Italy, which does not support two-way messaging, and France and Mexico, both of which do support it. Yet none of the three are working.
FURTHER UPDATE: I have tried creating a separate integration just for Italy, since they do not support two-way messaging. I have set it up to use the clickatell automatic mobile number formatting for that country. The result is the same. No text is sent and I receive no response of any kind from the server.
Can you please check/provide response from server when you submit message with number: +393921234567.
Most likely you get validation error - that this destination number not covered by number that you bought.
Have a nice day.
I've been using Twilio to send SMS and things work great. The only issue is that Twilio charges for both outbound and inbound messages. As such, we've been looking for other solutions.
We thought we found it with Plivo as their pricing was more favorable for SMS.
However, with Plivo, very quickly our outbound messages are being marked as spam or something and they're not being delivered.
We are sending the exact same message every day to about 5k users at a given time in the day. The message has a url in it, but it is something our users signed up for.
Two questions:
1. Why does everything work on Twilio and not on Plivo?
2. Is there a code change I can make to ensure our outbound messages sent with Plivo are not marked as spam by carriers and then stopped?
You need to contact Plivo about this. I experience this problem too. Their carrier mark our number as spammer since we are sending almost the same messages (verification). They called their carrier and our number was white-listed.
Plivo Sales engineer here. This is indeed an issue with the carrier marking your messages as spam. We can definitely help you overcome this. Could you please drop an email to ramya(at)plivo.com and we can sort this out?
You need to contact with Plivo support , there may be problem for number prefix for country like if you are using twilio you have to add +(with country prefix) but not in Plivo. It will be better to contact with Plivo support.
Thank You
I dont know how Pilvo work but usually with SMSC there is Message Queue associated sometimes with each SMPP Client and also with Mobile Station. You can't always send messages until your certain number of request are still pending. there is a specific error code that SMSC sent to its client about message queue overflow.
BADABING BADABOM! After having a look in the Plivo administration I noticed a new option under other-settings "Automatic Encoding Of Unicode Characters". As Norway uses inernational characters this is definately a setting for me, and after enabling it all SMS are delivered as expected. So remember to enable this setting.
MAKE SURE TO ENABLE THIS:
Path: Plivo admin / Messages / Settings / Other settings
Feature: Automatic Encoding Of Unicode Characters -> Enable
When I send a test sms from https://www.twilio.com/user/account/developer-tools/api-explorer/message-create with a predefined friendly name, it doesnt apear on my phone. I only see the number.
-if this isnt possible, do you know other providers with this function that work?
[UPDATE]: Twilio now supports this feature.
You can now send messages from an alphanumeric sender ID using Twilio. I wrote up a blog post on how you can achieve this in Ruby and you can check out this article on how to get started with an alphanumeric sender ID on Twilio for more of an overview. Then check out the documentation on how to send an SMS message from an alphanumeric ID.
[UPDATE] Previous answer is below.
Twilio developer evangelist here.
You're absolutely right, the friendly name defined in your account is actually for your uses only and is not intended to appear in place of the number when sending an SMS. We have a few reasons for this, which might be interesting to you depending on your use case.
I don't have a particular company that I can recommend that does allow you to do this. A Google search might help though.
I want to use Twilio to create an SMS relaying service where the Twilio number is the only number that is exposed, much like web proxy servers that allow you to access the Internet anonymously. I've used the example php code that twilio provides, saved it to a php file and hosted it on a public web server, then updated the messages URL on the Twilio site accordingly. Any message sent to the Twilio number the is forwarded to my mobile. Everything works fine, except for the fact that when I reply to the forwarded message from my phone, the reply includes a header that says "Sent from your Twilio trial account - + mymobilenumber" I understand that the header is inserted because I have a trial account, however I don't want the mymobilenumber field to be exposed. Is it possible to hide this?
I should mention I'm not really a programmer but I'm learning with Twilio.
I followed the example given here:
https://www.twilio.com/help/faq/sms/how-do-i-forward-my-sms-messages-to-another-phone-number
Thx
Antonio
A short code is a 5 or 6-digit number that can send and receive messages with mobile phones. These high-throughput numbers are perfect for apps that need to send messages to lots of users or need to send time sensitive messages. You can buy shortcodes from Twilio or port existing short codes to our platform.
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.