With Postman, developers and business stakeholders alike can test the Shutterstock API’s functionalities. Here’s a guide to using our Postman collection.
Application programming interfaces (APIs) allow applications to quickly exchange information and functionalities. However, APIs don’t have a visual user interface, which creates a steeper learning curve, particularly for a non-technical audience.
Postman is a tool that allows users to explore APIs with live calls which streamlines development and testing. Moreover, Postman’s visual interface is useful in demystifying what an API can do since it provides an organized environment for interacting with API calls and responses.
The best way to familiarize yourself with an API is to take it for a test drive. Here, we’ll help you get started with a step-by-step guide to making an image search call using the Shutterstock API’s Postman collection.
- Step 1: Importing the Shutterstock API Postman collection
- Step 2: Generating Shutterstock API keys
- Step 3: Authenticating in Postman
- Step 4: Making an API call
- What else can I do with the Shutterstock API in Postman?
Step 1: Importing the Shutterstock API Postman collection
First, you need to download the free Postman application for your operating system. Postman currently supports Mac, Windows, and Linux.
Once you have Postman installed, you can import the Shutterstock API Postman collection by clicking the orange “Run in Postman” button.
At this point, you should see the Shutterstock API folder in the left-hand column under the Collections tab.
Step 2: Generating Shutterstock API keys
You need a Consumer Key and Consumer Secret to make calls to the Shutterstock API. If you already have an account and application created, please feel free to skip this step.
To get a Consumer Key and Consumer Secret, you need to create an account and an application. Go to the Shutterstock Developer Portal and click on “Sign Up” to create your free account.
Once you sign into your account, you’ll be directed to the “My Apps” page. You can always access this page by hovering over the account icon in the upper right-hand corner and click on “My Apps.”
After submitting your app, you should see it on your profile immediately. Click on the app name to get your Customer Key and Customer Secret. These are the equivalent of a username and password so please treat them like you would any other sensitive information.
Step 3: Authenticating in Postman
With your Key and Secret in hand, we’re ready to dive into Postman!
Open Postman and double check that “SSTK Public API v2” is selected as the test environment (it may default to “No Environment”).
Click over to the “Authorization” tab and select “Basic Auth.” Fill in the username and password fields with your app’s Client Key and Client Secret respectively.
Basic Auth allows you to make calls to most endpoints available in the Shutterstock API. If you’d like to access your API subscription or user information, you would need to use OAuth.
Step 4: Making an API call
With all parameters organized in the Postman collection, you have the flexibility to select the ones you want to test. For this article, we’ll be making a call to the Image Search endpoint.
Click on “Images,” then “Search” which will display all available image search parameters. These parameters reflect the search filters available on the search experience on Shutterstock.com.
Clicking “Send” will prompt a live call to the Shutterstock API. You don’t need to specify values for any parameters for the Image Search endpoint to receive a response.
In addition to seeing how the API structures its response, you can also see the speed of the API response. Postman also allows you to save, download, and create your own collection of example responses.
What else can I do with the Shutterstock API in Postman?
Postman is particularly well-suited for developers who prefer UI-based REST clients and for non-technical audiences to interact with the API easily.
Beyond making a simple Image Search call, you can:
- Experiment with the different parameters available to simulate an end user’s experience with the API
- Create and organize collections for future use or modification to speed up development time
Increasing accessibility and visibility to our Shutterstock API is an important component to optimizing the developer experience. Empowering creativity is at the core of Shutterstock, and we can’t wait to what you’ll build!
Cover image by FGC