I am working on a project where I have a table data with Name,city,age,Phone Numbers and we have an Internal SMS API URL where the Phone numbers data which I have got has to send an SMS message by triggering the API URL by using POST method.
Let's Say I have 100 phone numbers in my table and the SMS has to be send to those 100 numbers one by one by using that API.
I have searched lot of articles but couldn't find my solution. So can anyone Kindly suggest how can I achieve it.
=> Get all Phone Numbers from db check Example.
=> Iterate all records using while loop .
=> Set all Phone Numbers to your API.
Related
how can I create a bulk sms code on twilio? Right now, I'm using Twilio Service api which can send up to 10k sms in 1 request. But I read that it only sends 1 sms per second so it means 10k messages means all will be sent after 3 hours.
Is it possible to do it like this on Twilio?
All of these should happen using Twilio API
Can create/delete lists that will identify the phone #.
Can add/delete phone numbers on the list.
Can request twilio to trigger a notification which will only ask for the list id instead of looping all phone numbers (which is the current way I'm doing it).
Currently im doing it like this:
$to = array();
$x = 0;
$message = 'Test';
foreach($phone_numbers as $phone_number){
$to[$x] = '{"binding_type":"sms", "address":"'.$phone_number.'"}';
$x++;
}
$notification = $client
->notify->services($service_id)
->notifications->create([
"toBinding" => $to,
"body" => $message
]);
If the phone numbers are more than 10k, it will not send all of them.
is there a way to make it like this?
the phone numbers are not stored on the database but instead stored on a list in twilio database then you will only need to call that list to send a message
also i can add multiple list which will identify what the notification is for
ex.
list #1 name is Room 1
list #2 name is Room 2
list #1 has phone number a, phone number b
list #2 has phone number a, phone number c
Twilio developer evangelist here.
The existing way you are using the bulk notifications API, by sending the numbers as part of the request, is just one part of the Twilio Notify API.
You can save numbers within Twilio and tag them as part of different lists. To do so, you need to create a binding. A binding is the connection of an identity and an address, in this case, the user's mobile number.
Notably though, this won't solve your delivery speed. There is a 1 message per second, per number limit when sending messages in the US to avoid carrier filtering. We also recommend you don't send more than 200 messages per day, per number to avoid the number being flagged for spam too.
Outside of the US things are less strict and the limit for sending messages is 10 per second, per number.
To overcome this you should either choose to use more numbers. If you are using Notify, then you are already using a messaging service with a number in the number pool. You can add more numbers to the number pool and the messaging service will distribute the messages between them. This will increase your throughput.
If you are sending that many messages in the US, then I would likely recommend using a short code. They are expensive, but they offer 100 messages per second throughput and, because they are more regulated, you don't need to use many different numbers.
Let me know if that helps at all.
My problem is this:
I have a survey that is taken by people that they're paid for. I want to avoid the same person submitting the form multiple times. It is a web application.
What I have tried:
I have tried recognizing the IP address from which they try to submit the survey but it hasn't worked.(They could just change devices and so, IP changes) I could try 2FA (where I authenticate using SMS/Voice to phone numbers) but free phone services like Google Voice/Twilio will render that useless. Using a SHA/MD5 hash on a combined key such as phone number and email address still faces the same multiple emails/phone numbers problem. Uber has recently covered up its tracks and devised a way (or a partnership) to recognize Google Voice Numbers. I have gone through the Google Voice API and haven't found a way to find the actual phone number linked to the Voice number.
Is there any full-proof way of doing this?
PS: I am NOT talking about multiple form submissions on a form (say a ecommerce website) which causes multiple charges to a credit card. Please do NOT suggest CAPTCHA.
I need to get carrier's code from given number in php. For example if phone number is of "Globacom Ltd" then I should be able to get carrier code "GLO". How to do it ? I checked clickatell.com but I could not find any such API.
I got a solutions from twilio api.
I am using the Esendex Rest API http://developers.esendex.com/APIs/REST-API/inbox and I am trying to get all the messages in the inbox from a particular phone number.
This is basically so if I do a send out of SMS's and someone replies I am able to retrieve the reply.
I can currently get all the messages in the inbox into an array and sort them, but this is too slow with over 4000 messages.
Does anyone know if I can filter by phone number, or at least date-received in my API requests? Even if I could get the last weeks worth of SMS's.
You can try to use the conversation API if you want to filter by a phone number. The drawback is that you can get only the latest 15 messages, also that there is no reliable way to detect if a reply has been received from a phone number other than the inbox API. Apart from this I wasn't able to find anything that can help you. Their API is very restrictive and minimal.
There's currently no way to do this via the REST API but I'll see if we can add it over the next couple of weeks (I work for Esendex). As you note the functionality already exists in the Conversations API albeit in a more minimal form.
In the meantime you could achieve this by checking all messages that arrive either by polling the Inbox or using Push Notifications.
i need an sms service that can gives me a phone number and then my customers can send me sms to that number. then posts the sms information to my website like http://xx.com/newsms.php?body=hey
Thanks
Twilio recently released a SMS API. With Twilio you can:
Get a unique phone number (not a keyword at a shared short code).
Easily connect it via a HTTP POST
It's ridiculously simple. Check out the API.
Try www.textmarks.com - they got a PHP API as well.
If the content can be public or semi-public you might consider using Twitter, which allows various ways of posting via SMS. Their API lets you do pretty much whatever you want with the resulting feed.
An upside of this could mean extra exposure for your site, depending on how you implement it. This is especially true if any of your customers happen to be heavy Twitter users. Also, people would be not be limited to SMS, but could post via web or twitter apps.