I'm testing the Twilio API for WhatsApp, responding to incoming messages with TwiML.
In the request I can retrieve the sender's phone number, but is it also possible to retrieve the sender Whatsapp nick name?
It is also possible activate the typing indicators?
Twilio developer evangelist here.
The inbound Twilio webhook for WhatsApp does not support the sender nickname and you can't set or receive typing indicators at the moment.
Related
I have created an agent on Dialogflow like a help desk, While making a service request the user enters his phone number.At the end of the conversation the bot says "you'll receive your ticket number via SMS on your entered mobile number".
How do I make it so that I received a text on my mobile number through Twilio with a random ticket number ?
Twilio developer evangelist here.
I believe that in Dialogflow if you want to run some code in response to an intent then you need to setup fulfillment using a webhook. That way you can build a webhook that uses the Twilio API to send the SMS and then responds with the message "you'll receive your ticket number via SMS...".
The Dialogflow docs on fulfillment via webhook has a tutorial on how to build this out. I would recommend reading through that and implementing your own fulfillment webhook.
I am trying to integrate Twilio WhatsApp API with my application, is it possible to send broadcast messages using Twilio.
Twilio developer evangelist here.
You can send outbound messages over WhatsApp using Twilio. There are some constraints though.
You need to get your users to explicitly opt in to receive WhatsApp messages
When you send a notification to a user, if it is more than 24 hours since the user sent you a message you can only send approved template messages.
Twilio Notify does not support WhatsApp, so to broadcast messages to a group of users you will need to make one API request per message using the regular Twilio messaging API.
Let me know if that helps at all.
I have been been able to use Twilio and SharePoint to send SMS messages. We would like to go to the next stage and create a question/response system and receive those SMS messages from our customers and add them to a SharePoint list, therefore kicking off workflows based on the customer's SMS response.
Any ideas ?
Inbound SMS are sent to your Twilio number which you can then define a webhook for. The webhook (the URL Twilio will sent an HTTP Request to when a message is received) will contain the Body of the SMS message.
TwiML™ for Programmable SMS
What is a Webhook
I tried looking all over the internet on how to setup and send text message(sms) through Dialogflow.
I am building an app where the Bot asks the user for their number and sends them a text message. Is there a tutorial? or anyone guide me I appreciate it?
As suggested by Nikhil, you need to use twillio APIs to send the SMS.
Here is how it will work:
Dialogflow will ask user for phone number and store it in a parameter
Dialogflow will pass the phone number to the Webhook
The Webhook will make an API call to the Twillio API with above phone number
Twillio will send the sms
Webhook can return some success message to the Dialogflow
Dialogflow will return the message to the user.
Here is a link to the tutorial I have created for understanding dialogflow webhooks: https://www.youtube.com/watch?v=1cD9vU7Ubyg
You can refer to this link for sending sms in PHP via Twillio: sending sms via twilio in php
I have a trial Twilio Acct and I have registered my number. I am able to send an SMS to myself using Node/Twilio API (Thanks!). I also have a listener in node for the return incoming webhook 'incomingSMSMessage':
app.on('incomingSMSMessage', function(sms) {
//_________________________Stuff here
});
So, from my Twilio Registered Number in my Trail Acct how do I get the SMS (actual message) sent from Twilio Number to my Node server? I realize I can use TwiML XML to respond w a hardcoded message, but I would like the actual SMS sent from my Twilio Registered Phone. If I must use the TwiML XML how do I populate dynamically with the SMS sent? I do not care about the message sent to the Twilio Phone- just the reply from the Twilio Phone SMS.
Twilio evangelist here.
You need to configure the Messaging Request URL of your Twilio number with a URL that points to your node server. To do this log into your Twilio dashboard, click the Numbers menu option, then click the number you want to configure. On the number configuration page, drop in a public URL in the Messaging Request URL field and save:
When Twilio receives an SMS message we will make an HTTP request to that URL, passing a bunch of parameters that you can use in your app.
Hope that helps.