Not Receiving Twilio message using conversation API in rails - twilio

I am working on Twilio conversation API and trying to implement a custom solution. Outbound messages are working perfectly. But the problem is I am unable to receive a message. When I send a message to Twilio trial number from my mobile phone, it shows the status as sent, but I don't know what's going on and why I am not receiving that message in my controller as i have already added a global conversatioin webhook for onMessageAdded filter. Here is my route:
support_webhooks_messages_incoming POST /support/webhooks/messages/incoming

Related

Twilio not sending webhooks in Progammable Chat

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.

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).

When connecting Twillio to my Bot, the Twilio device gets 404 when trying to post received sms

I connected Twilio connector to my registered Bot.
Whenever I send a sms to my Twilio number, I can see in the logs that Twilio service gets 404 when trying to post a message to
https://sms.botframework.com/api/sms
The bot itself works well. I can test it with the webchat iframe or through the test console. But it seems that the Twilio integration to the bot framework is broken
Twilio developer evangelist here. I've just been through the process and was able to get my messages sent to & from my bot.
The fact that your unable to do that suggests you missed a step in the configuration, so I will try and describe what I did here to see if it helps you out.
Created a TwiML application here and set its messaging url to https://sms.botframework.com/api/sms
Purchased a phone number and changed the messaging section to use my TwiML app.
Added my twilio credentials and twilio phone number to the SMS config section as follows:
One thing I noticed is that when Twilio makes a request to this URL to send an SMS, the url returns a 502.
But according to a Microsoft employee this is "harmless".
Let me know if this helps you at all, or if you still need any help.

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.

how to send more than ten messages via Twilio

I currently have developed a REST API that Twilio posts when an incoming message comes to a short code. Sometimes the reply message can have more than 10 sms messages and it looks like Twilio has a limit for the reply message as I see error in the Notification logs mentioning that it cannot send more than 10 messages. So what is the best way to get through this error?
Should I call the Twilio API for sending out the messages instead of using the Twilio Response? If so what should my HTTP response be? Little confused on what response should I be sending for the HTTP Response. Please advise.
I would just send nothing as the response, but use the opportunity to send out the 10+ messages using the twilio api.
Alternatively, send the first messages as the response and that send the 9+ immediately after as a new conversation.

Resources