Solid T.
Solid T.

Reputation: 21

Spotify — Get access token (for my own user) via Postman

How can I obtain a Spotify access token for my own user, but from Postman ?

I want to use Postman to fetch the access token from Spotify (without a preceeding manual log in).

If that's complicated, I would accept to manually log in first, before fetching the token from Postman.

  Details:

  1. To get an access token (to be used further in my own Postman requests), I manually have to get one, while logged in on the Spotify Developer website.

Therefore, I would like to obtain it directy from Postman, where I could immediately use it further in other requests/tests.

How could this be achieved ?

  1. I did define an app on Spotify (so I have the client_id and client_secret).

  2. I also have tried sending the cURL suggested in this Client Credentials Flow (one of the Authorization flows). Unsuccessfully:

    curl -X "POST" -H "Authorization: Basic ZjM4ZjAw...WY0MzE=" -d grant_type=client_credentials https://accounts.spotify.com/api/token

Upvotes: 1

Views: 3749

Answers (1)

engirugger42
engirugger42

Reputation: 21

Postman actually has all the various types of Spotify auth requests nicely packaged up in an exportable set of requests.

Came across it while researching the same issue and came across their blog post on using PKCE instead of implicit OAuth2 flows.

Upvotes: 2

Related Questions