1

I'm using Twilio messaging service to send SMS e.g:

curl --location --request POST 'https://api.twilio.com/2010-04-01/Accounts/REDACTED/Messages.json' \
--header 'Authorization: Basic REDACTED' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'Body=test' \
--data-urlencode 'MessagingServiceSid=REDACTED' \
--data-urlencode 'To=REDACTED'

For testing purposes, I want to route all incoming messages sent to the messaging service to a flow built in Twilio studio, so that I can route/forward the messages somewhere else. For the sake of simplicity, let's just say I want to forward all messages to my own mobile phone number.

I've created a studio flow and copied the web hook URL from the trigger enter image description here

The web hook URL is of the form; https://webhooks.twilio.com/v1/Accounts/{account-id}/Flows/{flow-id}

I've configured the messaging services to use the above web hook URL as shown below enter image description here

... but it's not getting through to my studio flow (or at least I don't think it is - I'm not seeing any logs in the studio): enter image description here

FYI. my messaging service has a single sender (which is a US phone number) and the To number specified on the request IS receiving the SMS. Ideally the number specified on the request does not receive the SMS, but the flow would be executed to forward the message to my own number...

I believe what I'm attempting to do is possible, so what am I doing wrong?

Ryan.Bartsch
  • 3,698
  • 1
  • 26
  • 52
  • 1
    Do I understand correctly that you're sending a SMS from your Twilio messaging service to a number and want to intercept this? I.e. Twilio messaging service -> Number A -> Studio Flow gets triggered-> Number A doesn't receive SMS? What you've configured is for the other way round, for "incoming" SMS, i.e. any outside number sends a SMS to your Twilio messaging service (any number in there) and then your Studio Flow gets triggered. – yvesonline Feb 03 '21 at 12:34
  • 1
    Ryan, not clear what you mean here as well, "Ideally the number specified on the request does not receive the SMS," ? Always easier to help if you state what you are trying to achieve instead of how you are trying to achieve it. Allows more options for useful responses. – Alan Feb 03 '21 at 13:14
  • OK I worked out that the flow is only triggered for *incoming* messages, and not the initial outbound message. My bad - all makes sense now. Thanks for the responses – Ryan.Bartsch Feb 05 '21 at 04:11

0 Answers0