Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Alphanumeric 'From' address with Twilio SMS

I am trying to send an SMS with Twilio using the alphanumeric 'from' address. I'm in Australia, sending to an Australian mobile number. My cURL request looks like this:

curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/<Account SID>/Messages.json' \
--data-urlencode 'To=+614XXXXXXXX'  \
--data-urlencode 'From=Test'  \
--data-urlencode 'Body=Test' \
-u <Account SID>:<Auth Token>

The response I am receiving is:

{
    "code": 21212, 
    "message": "The 'From' number Test is not a valid phone number, shortcode, or alphanumeric sender ID.", 
    "more_info": "https://www.twilio.com/docs/errors/21212", 
    "status": 400
}

I've tried a number of different alphanumeric sender IDs and none have been successful. My sender ID does appear to meet the [a-zA-Z0-9 ] with max length 11 and at least 1 alpha character requirement. I've double checked my Account SID and Auth Token as well as the ability to send Alphanumeric SMS within Australia. I've also verified I'm not accidentally using my Test code incase that would have any effect. My account also does have credit on it.

Thanks in advance for any insight you can offer :)

like image 950
dave Avatar asked May 06 '16 01:05

dave


1 Answers

Twilio developer evangelist here.

You're doing everything right for sending a message using an alphanumeric sender ID. However, in order to get your account setup for sending these messages you need to contact support and request your account is enabled to use alphanumeric sender IDs.

Let me know if that helps at all.

like image 109
philnash Avatar answered Oct 13 '22 12:10

philnash