This is where you will want to set up the app and the expected Request URL for said app.
After you get access to a number, you will want to go to the Phone Numbers section:
… -> Phone Numbers -> Click on your active number
Then scroll down until you see something like this:
This is where you can link the number to whichever request url you’d like to test. So whenever you text this number, the message that you send will then hit this webhook that you set.
To grab that message, add something like this to within your controller (wherever you have the webhook hitting). Please keep in mind again, as said in part 1, this webhook needs to be set as a post() route within Larvel/Lumen (or whatever you are using as your backend).
Of course, after all of this localhost testing with ngrok tunneling, you will want to change these webhooks to be the URLS of where they will actually live. But this is a great way to use ngrok as a production mask, that tunnels to your localhost environment as a quick and easy local sandbox!! So cool!
That’s it! Have ALL the fun with the actual logic paths and return text! Start a conversation with your chatbot…