Does twilio provide any test mobile numbers for different countries. I want to test whether SMS is sending successfully to some mobile number in Canada.
Is there any test mobile numbers that I can use for this purpose?
Twilio developer evangelist here.
We do not have test numbers available for you to send messages to. However, you can instrument your code such that you can find out from Twilio when you send messages that they are being delivered.
I recommend you set the StatusCallback parameter when you send messages. You set it to a URL on your server that can receive incoming webhooks and it will receive a request each time your message status changes to one of the following: queued, failed, sent, delivered, or undelivered.
That way you can be sure that your messages are sending correctly and arriving at the phones you expect them to.
Let me know if that helps at all.
I am currently using Twilio to send balance notifications for customers who have opted into SMS notifications, but have run into an issue in positively identifying accounts in the message logs. A number of customers have multiple accounts due to the nature of my industry, but naturally use the same phone number across all accounts. Is there any way to pass a parameter containing their internal account ID in the HTTP POST request without including it in the message body? I've searched extensively through Twilio's API docs and cannot find this addressed anywhere.
Twilio developer evangelist here.
As far as I know there is currently no way to store metadata, like your account ID, within an SMS sent via Twilio.
One idea could be that you purchase a number of Twilio numbers and tie together a user's phone number, a Twilio phone number and the specific account. That way, if you always send balance notifications for a specific account from a specific number then you can identify that message in the logs as belonging to that user phone number for that account.
Alternatively, I'd have thought it would be useful for users, if they have more than one account, to see to which account you are referring in a balance notification. Would it be possible to include the account id (or some other identifier that the user would recognise) and then parse that out of the message when reconciling messages and accounts?
Not exactly the question but if you are using twilio webhooks for status callbacks you can pass query string params through the status_callback parameter when making the call to send the SMS message and get it sent to your endpoint
I recently started using Twilio to send SMS in one of my apps. Although the twilio's dashboard shows that the SMS was send using the set alphanumeric sender id. It arrives on my phone with a different number totally. Anyone have any idea why? There's nothing about this on the Twilio website.
It turns out this is a carrier problem. They can change sender id (within reason) to increase the chance that an SMS is delivered. So there's basically nothing Twilio can do about it.
If you still have doubts, contact Twilio support.
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 want to try to send SMS to a cellphone in Austria. I have set up a free trial Twilio account to do so. however, my Twilio account seems not to be capable of doing so. but I think it should be possible to send SMS with the trial account?
This is a screenshot of my Twilio number where you can see that it's not capable of messaging:
this is the exception i get when running my python-code which tries to send the SMS:
twilio.rest.exceptions.TwilioRestException: HTTP 400 error: 21606: The From phone number +43720881723 is not a valid, SMS-capable inbound phone number or short code for your account.
any idea on how I can get this running? in other words: how can I activate SMS-capability for my free Twilio account? if this is possible, what are the limitations, i.e., how many free SMS messages can I send?
thanks!
To send SMS with trial twilio account TEST ACCOUNT SID and TEST AUTHTOKEN which is placed inside Phone Number > Tools > Test Credentials rather than ACCOUNT SID and AUTHTOKEN given by Console Dashboard > Account Summary.
Because ACCOUNT SID and AUTHTOKEN is bind after you buy the twilio number and TEST ACCOUNT SID and TEST AUTHTOKEN is bind with +15005550006.
If you received this error while trying to authenticate with your Test Credentials, you probably tried to send a message with a From number from your live account. The only number that can be used to send successful messages with your Test Credentials is +15005550006
If you use this number +15005550006 along with your 'demo' twilio sid and token, this will show you the success (no error) but it actually not sending you any sms/ text.
Go to this page https://www.twilio.com/console/sms/getting-started/build and set a phone number like "+133438*****". Twilio will auto provide you a number like (334) 384-**** and by clicking the buttons you need to generate the phone number as like "+133438*****". Once you successful, try to use your 'live' sid and token number within the API. But before integrating the same, you can fire a SMS in your own phone number from this page https://www.twilio.com/console/sms/getting-started/build.
Otherwise, the API error message will show you that - [HTTP 400] *Unable to create record: The 'From' number +1*********** is not a valid phone number, shortcode, or alphanumeric sender ID.
Your number is not capable (configure) for SMS sending. Go to your account and enable SMS capability. After that you will see a green check mark with text
"https://demo.twilio.com/welcome/sms/reply/" instead of Messaging". Similar to below screenshot
I got this error when I was using test Account SID and test Auth Token along with a regular number. Then I changed the Account SID and Auth Token to the regular ones and it worked as expected, i.e. allowed me to send SMS to a verified phone number.
If your number is sms capable and still you are getting the 21606 error, then check 'Active Numbers' tab under 'Manage Numbers'. It should show your number '+43720881723' as an active number.
I had found two errors in this regard, the problem is in the evaluation account and its limitations, but I found a way around it, within the rules of twilio.
Access this page and follow the instructions: https://www.twilio.com/console/sms/get-setup
Write down the number he gives you, this will be your new number, paste it in your application, it will solve your problem, but you still need to do one last thing, you need to check the number you want to send the message to, access this page:
https://www.twilio.com/console/phone-numbers/verified
After you do this, you can try to send the message again, if it fails, the problem must be elsewhere, as it worked for me.
To send SMS with trial Twilio account, test ACCOUNT SID and test AUTHTOKEN which can be found at
Phone Number > Tools > Test Credentials rather than ACCOUNT SID and AUTHTOKEN given by Console Dashboard > Account Summary.
In my case, upgraded my Twilio account and copied the US Florida phone number as it is (9549386330) and got
"is not a valid, SMS-capable inbound phone number or short code for your account"
I only needed to put "1" in front of 19549386330 and it worked.
so check the country code of your phone number as well.