Implementing the client credentials flow

The client credential flow is quite simple. Let's break down all the steps until we get the access_token:

  1. Our application will request the access token from the Spotify accounts service; remember that in our configuration file, we have the api_access_token. That's the URL we need to send the request to get hold of an access token. There are three things that we will need to send the request, the client id, the client secret, and the grant type, which in this case is client_credentials.
  2. The Spotify account service will validate that request, check if the keys match with the keys of the app that we register to the developer's site, and return an access token.
  3. Now, our application has to use this access ...

Get Python Programming Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.