Obtain the Authorization Code Access Token
Get the authorization code access token required to access the Spotify API endpoints.
As we discussed earlier, for all the endpoints where we access a user's resources, we need to use either the authorization code, the authorization code with PKCE, or the implicit grant flow to get the access token. In this lesson, we’ll learn how to get the access token using the authorization code flow.
Authorization code
The workflow needed to get the authorization code access token is as follows:
First, we need to redirect the user to the Spotify API server by making a call to the base URI https://accounts.spotify.com/authorize
with some query parameters. The user is asked to log in to Spotify using a dialog box.
After the user has logged in, a dialog box will pop up asking the user to accept or deny our grant request. ...