Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,23 @@
- Verify your email address if you haven't done so already.
- Click on the **Create app** button.
- In the **App name** & **App description** fields, you may put whatever you want.
- In the **Redirect URI** field, add `http://localhost/callback/`.
- In the **Redirect URI** field, add `http://127.0.0.1:{PORT}/callback/`. Replace `{PORT}` with any open ports on your local machine.
- Agree with Spotify's TOS and click **Save**.
- Click on the **Settings** button.
- Take note of the **Client ID** & **Client Secret**.

#### 2. Intermediary Steps 🛠️

```
https://accounts.spotify.com/authorize?client_id={CLIENT_ID}&response_type=code&scope=user-read-currently-playing,user-read-recently-played&redirect_uri=http://localhost/callback/
https://accounts.spotify.com/authorize?client_id={CLIENT_ID}&response_type=code&scope=user-read-currently-playing,user-read-recently-played&redirect_uri=http://127.0.0.1:{PORT}/callback/
```

- Copy and paste the above link into your browser.
- Replace `{CLIENT_ID}` with the **Client ID** you got from your Spotify application.
- Vist the URL.
- Log in if you're not already signed in.
- Click **Agree**.
- After you get redirected to a blank page, retrieve the URL from your browser's URL bar. It should be in the following format: `http://localhost/callback/?code={CODE}`.
- After you get redirected to a blank page, retrieve the URL from your browser's URL bar. It should be in the following format: `http://127.0.0.1:{PORT}/callback/?code={CODE}`.
- Take note of the `{CODE}` portion of the URL.
- Head over to <a href="https://base64.io">base64.io</a>.
- Create a string in the form of `{CLIENT_ID}:{CLIENT_SECRET}` and encode it to base 64.
Expand All @@ -121,7 +121,7 @@ https://accounts.spotify.com/authorize?client_id={CLIENT_ID}&response_type=code&
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Basic {BASE_64}" \
-d "grant_type=authorization_code&redirect_uri=http://localhost/callback/&code={CODE}" \
-d "grant_type=authorization_code&redirect_uri=http://127.0.0.1:{PORT}/callback/&code={CODE}" \
https://accounts.spotify.com/api/token
```

Expand Down