Send a GET request with parameters
In this tutorial, we will Postman to invoke the search artist spotify API from the previous lab which takes some parameters.
Click on New next to your workspace and select Collection. Name it Spotify.
Create a
new folder under
Spotify. Name it
Search. You can add some documentation to this folder by referencing the serach
API url as follow:
[Spotify search API documentation](https://developer.spotify.com/documentation/web-api/reference/#category-search)
Under Search, create a new request. Name it SearchItem.
-
To add the parameters to this
API as shown in the
previous lab, click on
Params, and add the parameters keys as shown below. You can add your own values.
The
search API indicates that it needs
Authorization. Click on
Authorization and make sure that the type
Inherit auth from parent is selected.
Click on Spotify collection. Then Variables. Add the variable {{SPOTIFY_AUTHORIZATION}}. Set the initial value to Your spotify authorization token.
-
Copy the generated token in the
Current value field of the created variable.
Click on
Authorization. Choose
Bearer token and fill the token value with the variable you just created
{{SPOTIFY_AUTHORIZATION}}.
Click on Save.
Go to your request
Search item and click on
Send et Voila! your GET request with parameters returns a
200 OK status code with all artists containing the words
Tania Bower.
-
Back to top