Twilio SMS - setting MessagingServiceSID

(Yonahforst) #1

I’ve add a Messaging Service SID to my Twilio bot and changed the phone number to ‘–None Selected–’.

However, I think the phone number is still included in the API call when flowxo sends an outbound message with twilio.

I noticed this because the Twilio ‘Sticky Sender’ and ‘Geomatch’ features don’t seem to be working. When my bot messages users in different countries, these features tell Twilio to be smart about which number it picks. In my case the messages are always sent from the phone number that was last provisioned on the flowxo twilio-bot.

Also, when I inspect the outgoing message in twilio’s logs, the ‘From’ number is set. I think it should be null if your sending via the MessageServiceSID (see here: https://www.twilio.com/docs/api/rest/sending-messages-copilot#example and look at the ‘output’ of the code example)

(Kellsey Shaw) #2

Hi there,

Sounds like you just need to remove the callback webhook in Twilio.

If you go to your Twilio account and click on Numbers. Find your number in the list (the one that’s being used with the bot) and open that up so that you can see the configure tab for it. Under the messaging section, you should see a webhook in the ‘A Message Comes In’ section. Should look something like flowxo-bm.herokuapp.com. You just need to remove this.

That should solve the problem :thumbsup:

(Yonahforst) #3

Hey Kellsey, thanks for the reply.

So, my numbers are all configured with Message Service instead of Webhooks. In the Message Service, I have the Request URL set under Inbound Settings so that I can receive messages. The Status Callback URL is blank.
Do you mean remove the Request URL from Inbound settings?

p.s. I went to Numbers and switched ‘Configured with’ back to webhooks, cleared it out, saved. Then switched it back to Message Service and tried again. Same issue.

Again, the issue is that I send a message to flow on one number, and get a reply on a different number.

(Kellsey Shaw) #4

Hi there,

You would have settings under both the phone numbers and messaging service. It.s the webhook under the phone numbers that you need to remove if they reference htttps://bm.flowxo.com

If you’re unsure, you are welcome to send screenshots of your messaging and numbers config screens to support@flowxo.com and we’ll help you find which webhooks to remove and which one’s to leave in

(Yonahforst) #5

Hi Kellsey.

Ok, I just double checked and I don’t have any webhooks under the phone numbers, they are all blank. All of the numbers are configured with Messaging Service.

But wouldn’t these callback only affect inbound messages? My problem is with outbound.

(Kellsey Shaw) #6

Hi,

There should only be one webhook in the Request URL under the Inbound Settings for the Messaging Service in Twilio. There doesn’t need to be any other webhooks.

The webhook allows us to receive the message that was sent to one of your numbers associated with the messaging service. We handle that and a response is sent back to Twilio who handle the sending of the message.

It may just be that the bot is still using the old settings despite the changes. Probably best to delete the bot (from bots in your Flow XO account) and then re-connect it doing a fresh connection to the messaging service.

Let me know how you get on