Is there any method through which I could add a time delay to get SMS StatusCallBack URL response from Twilio?
OR
Is there any other way through which I can let Twilio know that my service to process you callBack response is unavailable now?
Example: if I sent an SMS through Twilio with a StatusCallBack, I would be able to get after 1 minute of time delay in response.
Twilio developer evangelist here.
There is no way to delay the SMS statusCallBack. If you are unable to deal with a statusCallBack when it is sent, you could poll the API to check the current status of an SMS message.
Can I ask why you wouldn't make your service available to receive callbacks at any time?
Related
In Twilio, after we register a webhook URL in an active number, we'll be able to get event notifications whenever events occour in the registered number depending on the type of webhook we registered (Voice/SMS).
The registration of the webhook can be achieved via REST API. Similarly is there any API to stop the webhook notification? Else how should we handle this?
The same API, incomingPhoneResource, would be used do the same. You should be able to create, read, update and delete the configured webhooks for voice and SMS phone number configurations this way.
I am integrating Twilio SMS service where my users are able to send SMS messages to their clients. I would like to be able to link each reply with the sent SMS. In another word, is there any field in the Message Resource that could lead me to conclude whether the incoming message received is related to the outgoing message my user sent previously ? I need same behavior as Email send/reply functionalities.
Twilio developer evangelist here.
There is no way to do this I’m afraid, the SMS protocol has no information about users replying to a specific message. SMS is chronological, you can test this by opening your phone’s SMS app and trying to reply to the second to last message you received from someone. In SMS there’s no way to do that.
The best thing you can do is consider the messages chronologically, and assume that the reply is in response to the last message you sent to that number from the number you sent it from.
I suspect your are interested in this because you need to send notifications and get responses to those notifications and you realised you might need to send more than one notification to a user at a time but still get their responses. The best way to get around this is to use different numbers to send the different notification messages from, then when they reply you can tell which notification they were replying to by the number they sent the message to.
Hey Twilio Developer Evangelists, is there any way to get the sent message immediately with Send & Wait for Reply Studio Widget. It exposes three options:
Reply
No reply
Delivery Fails
But I am specifically looking for the Delivered option so, I can do something without waiting for a reply. I do want to wait for the reply but I also want to get the sent message right after it's sent. Is there any way I can achieve this? With webhooks to receive the sent message OR any other way?
With programmable messaging, Twilio gives an option to track the status of the sent message with statusCallback parameter but I do not see any option to provide a status callback in the studio widget.
Twilio developer evangelist here.
There is no way, that I know of, to achieve this in Studio. There is also no way to set a general statusCallback URL for outbound messages from a number.
I am sending SMS to the list of million of phone numbers Through twillio notification API.
But I want to keep track about SID against each phone used. so that I can process it further for any phone number.
So what's the better way.
is there a way that allow me to get phone SID by providing phone number to the API.But again there will be issue that sometimes I send multiple messages to the same phone number.
How can I do this. As making twillio notification call to send bulk sms it does not return SID's of every number used in binding
You can use the statusCallback in the Messaging Service Twilio Notify is using to get the Messaging SID's for each. Make sure your server infrastructure can handle the volume of webhooks Twilio returns to it.
I am using the Notifications APIs (Twilio Java SDK version 7.24.2). I've successfully sent the SMSes using the Notification API like:
private String sendMessageThroughNotificationService(String message, PhoneNumber receiverPhoneNumber){
Notification notification = Notification.creator(twilioNotificationSID)
.setBody(message)
.setToBinding(Promoter.listOfOne("{\"binding_type\":\"sms\", \"address\":\""+receiverPhoneNumber.toString()+"\"}"))
.create();
return notification.getSid();
}
Now, what should I do if I want to get the Notification's status through the SID of the notification that I am returning from the above method?
Does Twilio's Java Notification's API provide any way to find the Notification's status through its SID (if I don't want to use the register callback URL approach)?
Twilio developer evangelist here.
If you are only sending one notification at a time via SMS, then I recommend you just use the Messages API. That way the API will return the Message SID, which you can then use to look up the Message with the API and check its status.
There is no way to look up all the messages sent via Notify in order to check their statuses. The recommended method there is to register a StatusCallbackUrl to get updates on each status.
Let me know if that helps at all.