How to enable alphanumeric sender ID in Twilio? - twilio

I've recently created a Twilio account and upgraded it (i.e. added credit card and funded). However, when I go to the SMS settings, it still states that alphanumeric sender ID is disabled. The setting description says "Please note the Alpha Numeric Sender Ids will be auto-enabled once you upgrade the account" but this doesn't appear to be the case:
I've tried to see if I can use alpha senders regardless and it seems not. Trying to add an alpha sender to a sender pool gets to me this:
But the link for "request for enabling the feature here" is https://www.twilio.com/console/sms/alphasender/request which just redirects me to the console home page.
I've checked the doucmentation but it only mentions checking that this setting is enabled - nothing more about how to enable the setting.
Is there anything else I need to do to enable alphanumeric sender IDs?

Depending on your country's telecom laws, specialized SMS sender IDs like short-codes may have application processes attached to them that are outside of a regular paid Twilio account.
Talk to your Twilio account rep or failing that, reach out to Twilio support.
If you click through to the support article, you can see the support for your country.

Related

Twilio SMS Webhooks and Group Text Messages

Is it possible to maintain both group text messages and single text messages with users and keep them separate? I understand there is no concept of a group message per se, but wanted to see if any recent advances in tech has made this possible with Twilio or other providers.
In short, I am creating a POC where a user inside an iOS App can send invoke an API call to my backend application. This application receives a phone number from someone's contact list, and then connects to Twilio to send the SMS message to that target user.
When the user replies, I was researching Twilio Web hooks to receive the message, and then save it in the database. The originating user, then, would be able to see the message on a screen.
I would guess that when a user responds to the twilio message, the only metadata that comes in is their message and phone number, so the "foreign key" is the phone number.. Thus when I save it in my database, I have their phone number and message.
This works up until someone decides to target two or more people in an SMS message using my API, and then target one of those people individually. For example they select me as a sole recipient, and then select me and someone else as a group text message.
In this case, how could my system/Twilio differentiate between if I was responding to the group message, or to the single message?
Any ideas or work arounds? Maybe another technology? Thanks!
I wanted to provide an answer to this in case anyone else was looking into this.
Essentially you pay 3 cents (0.03) per month per active user in each group. Basically you buy phone numbers for each group chat you need.
https://www.twilio.com/conversations/pricing
So if you're doing a million group chats obviously it can get costly, but for simple POCs this isn't the end of the world.
Enjoy!

Checking Request Inspector's current state

I'd like to play back credit card numbers for verification purposes; however, when you do this it exposes the redacted CC in the Request Inspector logs. Of course, I can turn these logs off, but Infosec wants more assurances that Request Inspector remains off and that we have steps in place in case it gets turned back on while live calls are arriving or is turned on and forgotten about.
Aside from seeking to have Twilio set it in a permanent state, I've proposed trying to code a status check that would account for either scenario.
That said though, is the Boolean/Toggle for Request Inspector available to be read from the API?
Example lazy code:
IF(Request inspector = 1) say "Please confirm that you wish to pay xx amount"
else if(request inspector = 0) say "Please confirm that you wish to pay x amount using your credit card 400000000000000"
Basically:
If inspector is on, don't read the CC.
If it's off, you can read CC
Twilio developer evangelist here.
In reality, you should enable PCI mode in your voice settings which is permanent.
As far as I know, you can't read or change the status of the request inspector via the API.
What I might suggest is that for testing you create a separate project within the Twilio console which is responsible for all its own resources. When you run in a test mode you can then use the credentials for this project and log or repeat actions and confirmations as you require. Then, when you run in production mode, you use your production account credentials which are in PCI mode.

Twilio SMS - what am I doing wrong?

So, I have WHMCS setup to use Twilio with a new module, however, I have managed to get as far as setting it up and having SMS messages go out to customers in Australia as I have an AUS number connected to my Twilio account.
The issue is that when say for an example a US customer signs up the SMS fails and says "cannot send sms", the logs aren't helpful for this Twilio newb.
Here is the example:
The process of sending SMS to the user phone number (+1310xxxxxxx) from the summary page has failed - Twilio (company name)
If I was to send a message to say Spain it seems to work, which is odd enough.
I also tried on a +34 and it sent. Also seems to work on the UK +44.
I have GEO options setup to work as they should within Twilio, though, the error message does not appear on my Twilio logs, simply internal.
Here is the module log.
I have only edited the text out to give you what is showing.
Request:
Array
(
[To] => +1310xxxxxxx
[Body] => test
[From] => Company name
)
Response
The 'To' phone number: +1310xxxxxxx, is not currently reachable using the 'From' phone number: Company name via SMS.
So presently SMS messages to the USA do not work, I cannot speak for every other country out there though, what can I do here or how would I set my Twilio account correctly to ensure my SMS messages are being delivered?
Many thanks.
Twilio developer evangelist here.
From what you're saying I think you're sending messages using an alphanumeric sender ID rather than a phone number?
If that's the case then you are getting rejected from the US because the US telephone system doesn't accept alphanumeric sender IDs (neither do some other countries, just not the ones you've tested). You can see the countries that do and don't support alphanumeric sender IDs in this table in our documentation.
To fix this you'll need a number to send the messages from in the US, I'd recommend getting a new US number for this.
Then you can either catch the error and retry using the number in place of the sender ID.
Or, for a more resilient method, take a look into Twilio Messaging Services that can do automatic failover to a number when sending with alphanumeric senders.
Let me know if this helps at all.

IOS: How to verify user's phone number using codes

i am working on an app in which i take a field of mobile number of user after entering mobile number there is a option for verify phone number.
but i don't know the functionality of how to verify a user's phone number within the app using codes.I search for similar type of questions but didn't get the exact solutions.
i am sending a screenshot of my app where i want to put that functionality.
i didn't apply any codes for this
please help
You need a backend that can generate and save codes for each phone number and also send a text message with those codes. So the flow is as follows:
User enters their phone number in the app and presses the "Verify Number" button.
You send a request to your backend with the number provided. In the app, you also displays a text field for user to enter the generated code and a new button like "Check code".
The backend generates a new code (just a random one), stores it to the database (like ID,PhoneNumber,GeneratedCode,DateOfGeneration) and sends a text message with the code to the phone number specified.
When the user receives the message he or she enters the code to the checking input field and presses the "Check" button.
The mobile app sends another request to the backend with the phone number entered earlier and the code entered by the user now.
The backend looks to the database for the "Phone number" - "Code" pair and responds with failure (the code is incorrect, try again) or success (the phone is verified).
Unfortunately, there's no way to access text messages received by user from within an app on iOS devices (unlike Android). The proof link was already provided. So the user has to manually enter the verification code from the message.
Ok I tell the information how was I already did my project in before
Step-1
when user press the Verify Number button
initially I check the phone number is valid or not(means phone number count/length).
second I generate the random number on progrmatically like NSUInteger r = arc4random_uniform(16);
Step-2
send the random number to server along with the vaild phone number , the server send the random number to the particular mobile number using SMTP Server.
Step-3
in your hand you have the random number , so open the UIAlertview for user type the valid random number , if user typed the vaild number show the Next Screen else show the Alert.
To verify any mobile number you can use third party api's which are available for mobile as well as backend server. You can use Twilio Messaging Api. To use this API follow below steps:
Register account on Twilio and get key from account.
Get user's phone number from mobile application.
When user click on the "Verify Number" button, call web-service with the number.
When you'll call the web-service, write a logic to send the random number with the Twilio messaging api to send message to user.
When user get this number through SMS, You can tell user to enter the number and verify it.
Also, there is another api which you can directly integrate into your mobile application. You can find this Sinch Api here.
To verify against your device's phone number, first, you need to get the phone number from your device and then you can compare against. However, after iOS 4, getting phone number of your device is quite impossible. Even if, you do get the device's number using some private api which I am not sure works entirely, there is a huge possibility for Apple to reject your app.
Refer to the following stack overflow discussion-
Programmatically get own phone number in iOS
Just a suggestion: You probably want to look for a work around based on your business goal. For example, rather than checking for device's phone number directly. You can generate a code and send that to the number specified by the user and then enter that code to verify that the user has that device.

SMS default contact name

Whenever I receive a text message from some services (namely Google and Blablacar), I see the service name as the sender (like if it was in my contacts) instead of an ugly phone number, as it appears when the text message comes from other services (Snapchat, Hello Bank).
I don't know if an app from the service needs to be installed on the iPhone for the service name to appear instead of the phone number : I have the BlaBlaCar app installed and (of course) one of the Google apps (Maps), but the sms from Google was to confirm my phone number as I created a google account my computer, not on my phone. So the text message cannot "come from" the iOS app.
When I click the sender "Contact" button and then the Info icon, I can see the real sender phone number (ex 4 66 45 3 for google and 2 52 25 22 27 for blablacar).
I have never added those phone numbers to my contacts myself, neither I see those "contacts" in my contacts.
I would like to know how it is made, so I can do the same when sending a text message from my server.
Are there some kind of pre-embedded default hidden contacts in iOS ?
Is there a field to fill in the app plist file like "default app phone number" that I didn't see ?
Is it some kind of a registration process with Apple so you can associate a phone number to a specific name ?
Thanks
Alright, I was looking in the wrong direction, this has nothing to do with iOS, Apple, or an iOS app setting, this is a feature of the Short Message System called Sender ID.
Here is a thread which lead me to the answer : http://developer.nokia.com/community/discussion/showthread.php/109878-How-to-Send-SMS-with-Sender-Name
This ability to set the sender ID is offered by many of the SMS sending platforms (Clickatell, SMSCountry, blastSMS...), but apparently it might not work in every country.
Here you can find some info about it : http://www.smscountry.com/custom-sender-id.aspx
Hope it will help if someone wonders like me "How hell Google has put itself into my contacts ?" !

Resources