🔧 Setup Postman for Amio API

This tutorial will guide you through the setup of Postman to help you evaluate Amio API.

Postman is a developer tool which makes it easy to invoke REST API requests and receive their responses. You can even use environment variables and quickly switch between different requests (which is kind of difficult with older tools like cURL).

Prerequisites

  1. Install Postman.
  2. Download Postman collections for Amio (click the orange button “Run in Postman”)
  3. Connect your Facebook Page to Amio.
  4. Get your first contact. Either send a message from your FB account to your FB page or use the send plugin in administration

Hands on the Setup!

First, we will setup some Postman’s environment variables so that you can freely switch between a simple text and a structured message without having to copy all ids and access tokens again and again. Environment variables are introduced to your requests via placeholders, e.g. {{serverurl}}.

In Postman, select environment amio and open the environment variables editor. You will get the values from Amio administration:

1-env-vars

  • access_token - Copy your access token from Settings/Api.
  • channel.id and contact.id - Go to channels and select your connected Facebook Page. From there, navigate to Contacts tab and copy channel id and contact id.

2-fb-channel

Test Requests

Settings is done, let’s test some requests. From the left side pane, open the Messages/Facebook Messenger collection and select the Image request. Hit the Send button on the right side. You will see an HTTP response. If the status code is 200, you should see the messages in your Messenger.

3-postman-request

You’re done. Now, you can quickly write and test new requests without going down to programming. Cheers!

Show Comments

Get the latest posts delivered right to your inbox.