In this tutorial, we will discuss what Postman is and how to quickly get set up with it.
Postman is a desktop and web application that allows you to make requests to an API from a graphical user interface. We recommend using Postman with the Twitter API, Twitter Ads API, and Labs endpoints when exploring the APIs functionality, as well as when you are troubleshooting issues with your application.
We currently have three Postman collections available:
Before you get started with using Twitter’s Postman collections, you will need to make sure you have the proper access and credentials for the Twitter developer platform tool of your choosing. You can learn more about getting access via our “Getting started” page.
Once you have an approved developer account, have set up a developer App and have a set of authentication keys and tokens, and have properly set up your environment to make requests to the specific API that you plan to use, you can follow the below steps to get started.
Getting started with Twitter's Postman collections
Step one: Add one of the Twitter Postman collections to your account
While you could build out the specific endpoints that you’d like to use within Postman, we did all of the heavy lifting for you and built out a ready to use collection of relevant APIs. Just click one of the links in the earlier “Postman collections” section and a collection with all of the endpoints associated with the selected API will be added to your Postman app. These collections are also available in the Postman API network. Each endpoint will automatically include available parameters, example responses, and authentication type plugged in, so you just need to add your credentials and parameter values to start exploring the functionality.
In this example, we are going to work with the Twitter API v2 collection.
Step two: Add your keys and tokens as environmental variables
When you add the collection to your Postman instance, it will automatically add an environment called ‘Twitter API v2’, which you will need to add your keys and tokens to. In this step, we will walk you through the process of adding your keys and tokens from your developer App into the ‘Twitter API v2’ environment.
To add your keys and tokens to the “Twitter API v2” environment, click on the “manage environments” button in the top right corner of Postman., you will need to click on the settings button in the top right corner.