Receive Message

🚧

In order to receive messages, your RBM Agent must already be registered with RBM. You can find out how the register the Agent here.

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.

  1. Download and install Ngrok.
  2. (Optional) Create a server app with opened URL for Amio webhooks, i.e. http://localhost:<YOUR_APP_PORT>/webhook/amio and start it.
  3. Start Ngrok for routing to your local server with the command ./ngrok http <YOUR_APP_PORT>. If you haven't started your own server, use 80 as <YOUR_APP_PORT>.
530530
  1. Copy the forwarding URL from Ngrok (https://c25d851e.ngrok.io in our example) and set this URL in Amio app (Channels → Pick your RBM channel → Webhook tab).

📘

Discover RBM Agent

Users cannot discover RBM Agents. RBM Agent has to send a message to a phone number first . Only after that the user can reply.

  1. Go to Messages app and send a message to the RBM agent.
  2. If you started your local server in point 2, observe your local server has received an HTTP POST request.
  3. You can see all incoming requests in Ngrok web interface as well in http://127.0.0.1:4040.

What’s Next