ridershow / intercom-postman-collection

A Postman Collection file for the Intercom API http://developers.intercom.com/reference Includes extraction code to generate the latest version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intercom Postman Collection

Setup

1. Importing

  • Use the intercom-postman-collection.json listed in the repository

Postman

  • Import > Import File

import - Postman

Insomnia

  • Main Menu > Import/Export > Import Data

import - Insomnia

2. Getting Access Token

Intercom access token

  • Note: some API endpoints require an Extended Access Token
    • If you try to access these endpoints with a Standard Token you will get a Not authorized to access resource error (full error details shown below)
    • Ensure to apply for an extended access token
"errors": [
	{
		"code": "token_unauthorized",
		"message": "Not authorized to access resource"
	}
]

3. Configure your environment variables

  • Create an AccessToken variable with the value of your access token obtained in the previous step

Postman

  • Environment Options > Manage Environments > Add

configuration - Postman

Insomnia

  • Environments dropdown > Manage Environments > +

configuration - Insomnia

Extracting the latest Postman collection

  • Code for the extracting is in the extract folder
  • It downloads the latest developer docs page and extracts out the curl commands and transforms them into the apporpriate
  • Requirements: NodeJS and npm
  • Usage
# change to directory with code
cd extract

# install dependencies
npm install

# run extractor to generate `intercom-postman-collection.json` file to be imported
node index.js

About

A Postman Collection file for the Intercom API http://developers.intercom.com/reference Includes extraction code to generate the latest version


Languages

Language:JavaScript 100.0%