To make the application more flexible and easy to configure, we are going to create a configuration file. This way, we don't need to hardcode the URL and access keys; also, if we need to change these settings, changes in the source code will not be required.
We are going to create a config file in the YAML format to store information that will be used by our application to authenticate, make requests to the Spotify RESP API endpoints, and so on.
The application's configuration
Creating a configuration file
Let's go ahead and create a file called config.yaml in the musicterminal directory with the following contents:
client_id: '<your client ID>'
client_secret: '<your client secret>...