You can receive messages from users you've already been in contact with or even from users who have contacted you for the first time. In this case, you should save new users' ids in your application in order to be able to reply them later on.
Receiving messages is technically done using Message Received webhook call which you receive from Amio server whenever someone sends you a message.
For the purpose of this tutorial, we will use Ngrok to route incoming webhook calls to your local machine.
- Download and install Ngrok.
- (Optional) Create a server app with opened url for Amio webhooks, i.e.
http://localhost:<YOUR_APP_PORT>/webhook/amioand start it.
- Start Ngrok for routing to your local server with command
./ngrok http <YOUR_APP_PORT>.
- Copy the forward url from Ngrok (
https://c25d851e.ngrok.ioin our case) and set this url in Amio app (Administration - Channel Detail - Webhook tab).
- Go to Facebook Messenger and send a message to the Facebook Page you've already connected (see Connect Facebook Page).
- Observe your local server has received an HTTP POST request.
- You can see all incoming requests in Ngrok web interface as well
Updated about 5 years ago
See different users' entry points.