Make an API call
Make an API call
With the Box Postman Collection forked into the Postman App it is now possible to make API calls to the Box API on behalf of the user you logged in as.
First: Reset browser storage
Now that you've imported the Box API credentials into Postman you should take a moment to remove these credentials from your browser's storage.
Select an environment
Before an API call can be made it is important to select the right Postman environment to use when making API calls.
When you imported the Box Postman collection it automatically imported a
Box
Postman environment for you to use. The collection will automatically
recognize and use the variables in this environment for making API calls.
To select the Box Postman environment, select Box from the dropdown in the top-right of Postman.
You can inspect the environment by clicking the eye icon to the right of the dropdown.
Make an API request
To make an API request, select a Request from the Box Postman Collection. In this example, we will use the List items in folder API which can be found in the Folders folder.
By default the folder_id
for this API endpoint is set to 0
which represents
every user's root folder. You can leave this value as is or set it to the folder
ID of a folder you want to inspect.
Next, click the Send button in the top right to make the API request.
The API call should return quickly and show you a list of items in your folder in the response Body tab in the bottom half of the screen.
Summary
- You selected the Postman environment to use for making API calls to Box
- You made your first API call to Box, requesting the folder items for your user's root folder.