Twilio not sending webhooks in Progammable Chat - twilio

I would like to ask a question or maybe report a bug after solving my doubts. I started working with Programmable Chat and Twilio do not want to send a webhook to specific url but only when I'm sending message from my PHP code. I downloaded example node app and sending message from that, everything is working really nice, I'm getting post request from Twilio but if only I will send message from PHP, nothing at all. And strange is, after sending message from PHP, it will appear immediately in chat which means that it's working.
How does it possible? Could it mean that Twilio on theirs backend has an a bug when they receive message from PHP and becuase of that they are not fire webhook event?
I eliminated all differences, everything is that same beside that one message is sending from PHP and another from node. Same situation from API Explorer.
Gif presentation

Twilio developer evangelist here.
When you send messages to Programmable Chat from the REST API then webhooks aren't triggered. I think the reasoning is because you are making the call from your server, then your server is already aware that you are sending a message and you don't need to receive a webhook to do so. It also saves from the potential of infinite loops (if your webhook sends a message via the REST API, the requests would just go in circles).
So, it's not a bug, but a design choice. If you need to trigger your webhooks when you send a message from the REST API, you will need to make the webhook from your own server.

Related

Twilio: track user action on SMS links and reply based on that action

I using twilio flow to create simple chatbot that sends user a whatsapp message with link to provide some details and once user has provided the required details on web page, chat bot must reply with a THANKS message.
Is there anything like postback using rest api on active execution based on which a thank you message can sent.
Please have look on diagram as well.
Twilio developer evangelist here.
When you say you are using Twilio flow, I guess you are using Twilio Studio to send the messages. In this case, I don't think you can achieve what you want with Studio. You can't move an execution on with the REST API.
However, it should be fairly straightforward to send the thank you message from your application using the Twilio Messaging API instead.
What you will need to do is, when the user submits the form, in your back-end code as well as saving the data to your database, make a call to the Twilio API to send the WhatsApp message. I'm not sure what your application is built in, so I've just linked to the relevant documentation.

Send customized bulk SMS with twilio

I want to send different messages to multiple users at once. I read the article here: https://www.twilio.com/blog/send-bulk-sms-twilio-node-js-html but it mentions nothing about sending customized messages. The only difference in my messages is the user's name.
The best solution I can think of is to create x number of API calls to send messages to x numbers. I believe that's going to be time taking. Is it possible to do it with one API call?
Twilio developer evangelist, and author of that post, here.
You are right, there is not currently a Twilio service that allows you to send bulk messages with customised messages with one single API call. You will have to make an API call to the messages resource for each message you want to send.
When sending messages in bulk, I recommend you read and understand this article on Twilio rate limits and message queues. That will ensure you are successful in sending your messages.

Trying to get inbound text responses in GoHighLevel

I have Twilio integrated with GoHighlevel. I am trying to get inbound SMS responses to appear in the GHL contact. Outbound messages are functioning and logging correctly, but not inbound. Can anyone assist?
Twilio developer evangelist here.
I've not used GoHighLevel, so this is a bit of a stab in the dark.
Incoming messages to a Twilio number trigger a webhook (an HTTP request) to an application to notify the application. If the webhooks aren't set up correctly, then those messages won't make it to the other application (though they are all stored within Twilio).
I would recommend you log in to your Twilio account and check the settings for your numbers. You want to ensure that your numbers have a GoHighLevel URL setup for incoming messages.
In one of the GoHighLevel support topic videos for Twilio I spotted what the webhook URL should probably look like.
https://api.gohighlevel.com/twilio/incoming_message
Check your numbers, make sure they have something like that. And if it is still not working then I would contact GoHighLevel support to find out what the correct settings should be.

How do I receive a Twilio SMS into a Logic App?

How do I create a Logic App to receive an SMS?
I made some progress in my question here
I have been studying the information I found here
and have configured the Twilio Webhook to Call the Http endpoint when a message comes in.
following instructions similar to this
I copied the Request Body JSON from the instructions.
If I the Add A Twilo -Get Message Action it asks for the Unique SID of the message. I can't know this at Logic App Design Time, so how do I get it?
Instead letting Logic App to "retrieve" the message from Twilio, as mentioned in the comments, you should set up a webhook in Twilio's settings page to invoke Logic App ('s request trigger).

Twilio is sending their own messages for Start/Help and Stop instead of using our API reply message

Our database shows that we are sending reply messages to Twilio for START/STOP and HELP message. But when we send a text for the above messages we are getting responses from Twilio instead of our REST API Web Service response. How do we make Twilio send our responses instead of twilio response?
This seems to be working fine during the testing phase and seems to be something new after our API went Live. How do we fix this? This is causing issues as we activate/deactivate a number based on START/STOP text and that is not happening when Twilio is sending their own message as our users have to follow some procedure after they send a STOP text. Even the HELP text is not coming to our web service and instead Twilio is sending a default Help text from their side.
You need to contact Twilio via support and ask them to turn their opt-out processing off.

Resources