Postman is a popular tool to help test and develop APIs. To make it more convenient for developers who are integrating with Foursquare Places API, we’ve created a Postman collection that contains the set of APIs commonly used by our developers.


Set Up

Set Up Using Run in Postman

We recommend setting up Postman using the Run in Postman button:

  1. Download and install Postman here.

  2. Sign up for a Foursquare Developer account and follow the instructions to create a new app. Note the Client ID and Client Secret that has been provided to you, and keep these values within your team/organization.

  3. Once you have Postman running, click on this button to immediately import the entire collection and environment into your Postman app:

Run in Postman


After it has been imported, you should be able to see Foursquare Places API under Collections and Foursquare Places API as the environment:

screenshot of Foursquare Places API in the postman environment

Set Up Using GitHub Repo

  1. Download and install Postman here.

  2. Sign up for a Foursquare Developer account and follow the instructions to create a new app. Note the Client ID and Client Secret that has been provided to you, and keep these values within your team/organization.

  3. Download the collection.json and environment.json files from the GitHub repo.


Configure

Postman allows us to use a configurable environment using a set of key-value pairs, creating commonly used variables that can be referenced by multiple requests in our collection. More documentation on the Postman environment can be found here.

It is important that you edit and replace some of these variables with your own values. Access the edit dialog by clicking the gray eye button next to the environment dropdown (highlighted in blue below):

screenshot showing gray eye button on top right corner of postman

Then, click edit (highlighted in blue below):

screenshot showing a list of configurations in postman

Replace the client_id and client_secret with your own initial values. You should have obtained these when creating your own Foursquare app. If not, you can get them here.

screenshot showing to add client ID and secret to variables section in postman

You may leave the other variables empty as they are used to send information between requests.

The oauth_token and EDIT_VENUE_ID variables will only be used for the endpoints in the Venue Edits (Exercise Caution) folder, which we will explain below.


Test

You’re now set to choose any of the APIs in the collection to start testing.

If this is your first time using or evaluating Places API, we advise you to look into the Popular Endpoints folder. Within our developer community, these endpoints are the most widely used as they cover a wide range of features and data you can pull through our API.

Running the requests in this folder also generates the variables for us to showcase sample responses for other endpoints.

To run all the requests in the Popular Endpoints folder at once, click on the Runner button located on the top left corner (highlighted in blue below):

screenshot showing the runner button on top left corner

This will open the Collection Runner dialog.

  1. Select Foursquare Places API -> Popular Endpoints.

  2. Select the Foursquare Places API environment.

  3. Check the Keep variable values box.

screenshot showing recent runs in postman

Then click on the blue button to run the collection.

You should check to make sure all requests return with a 200 OK response.

If you received a 401 UNAUTHORIZED response, make sure you have copied the correct client_id and client_secret values when setting up the environment.

screenshot showing run summary in postman

You may close the Collection Runner dialog and proceed to test the individual endpoints with the variables generated by the Collection Runner. The APIs are ordered the same way as they appear in the docs to make it easier for you to follow. Feel free to edit the requests any way you’d like. Our intention is to help you test and evaluate our API conveniently.

screenshot showing an example of running a Foursquare API in postman


Was this page helpful?
Yes
No
Thank you!