Add steps for API Key Generation to README

This commit is contained in:
aditya-K2
2023-04-14 05:40:43 +05:30
parent a1b79f782c
commit 3e929d6072
3 changed files with 31 additions and 0 deletions

View File

@@ -16,3 +16,34 @@
***In a very experimental stage.***
## Setup
### How to Generate an API Key from Spotify Dashboard
If you want to use Spotify's API to create applications that interact with their music streaming service, you will need an API key. Here's how you can generate one from the Spotify Dashboard:
1. Go to the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/) and log in with your Spotify account credentials.
2. Click on the "Create an App" button to create a new application.
![Create an App](./extras/create.png)
3. Give your application a name and description, and agree to the terms of service. In the `Redirect URI` section add `http://localhost:8080/callback` as a callback URL. This is necessary for the OAuth 2.0 authentication flow to work. Click on "Create" to proceed.
![Create an App Form](./extras/create_form.png)
4. On the next page, you'll see the details of your newly created application. In the Settings Look for the section labeled "Client ID" and click on the "Show Client Secret" button.
5. You will now see your Client ID and Client Secret. You will need both of these to use the Spotify API in `gspt`
```bash
$ export SPOTIFY_ID= # client id
$ export SPOTIFY_SECRET= # client secret
```
7. After this you can just run `gspt`. And follow the link that it generates, and Login.
```bash
$ gspt
```
---

BIN
extras/create.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
extras/create_form.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB