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
- Install Postman.
- Download Postman collections.
- Connect your Facebook Page to Amio.
- 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. {{server_url}}
.
In Postman, select environment amio and open the environment variables editor. You will get the values from Amio administration:
access_token
- Copy your access token from Settings/Api.channel.id
andcontact.id
- Go to channels and select your connected Facebook Page. From there, navigate to Contacts tab and copy channel id and contact id.
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.
You’re done. Now, you can quickly write and test new requests without going down to programming. Cheers!