Skip to content

Testing tools and phone numbers

Postman lets you send HTTP requests to the API without writing code. Amio publishes a collection of ready-made requests in the amio-postman-collection repository. Import it into Postman and set your access token in the environment variables. See Authentication for where to find the token.

Amio sends webhooks to a public HTTPS address. To test on your own machine, use a tunnel such as ngrok.

  1. Start your app on a port, for example 8080.
  2. Run ngrok http 8080. ngrok prints a public https forwarding address.
  3. In the channel’s Webhook tab in app.amio.io, set Webhook Url to the forwarding address plus the path of your handler, for example https://<forwarding address>/webhooks/amio.
  4. Send a message to the channel. The request appears in your app. You can also see it in the ngrok web console at http://127.0.0.1:4040 and in the logs of the Amio administration.

Amio stores and returns every phone number in E.164 format without the leading +, for example 15558576309. When you send a message you can write the number in any format: Amio removes every character that is not a digit, and a leading 00 as well. So +1 (555) 857-6309 and 001-555-857-6309 both become 15558576309. Webhooks and responses always contain the normalized number.

Every contact also has a unique ID. Use it to track a contact instead of the phone number.