0
votes

I'm using the following guide to handle incoming messages: https://www.twilio.com/docs/sms/tutorials/how-to-receive-and-reply-node-js

I added the endpoint for my prod environment to the "A message comes in" webook, which is working when I test in prod, but I want to test incoming messages from my dev environment too. Is there a way to add a second endpoint for this twilio phone number's webhook, or will I need to add another twilio phone number?

1

1 Answers

2
votes

You will need to add another Twilio number, since each Twilio number can only have one webhook for "A message comes in...".

You create your own Proxy routing logic, which intelligently delivers the webhook to specific URL/destination based on some criteria in your logic. Your proxy routing logic would then be the destination for the "A message comes in...". This proxy routing logic could be done using a Twilio Function as an example.