-
Notifications
You must be signed in to change notification settings - Fork 1
API Refresh Key Setup
Jon Prentice edited this page Feb 16, 2019
·
1 revision
- Go to the following URL in a web browser and allow access to the streaming device's account:
https://accounts.spotify.com/authorize/?client_id=<CLIENT_ID>&response_type=code&redirect_uri=<REDIRECT_URI>&scope=user-read-private
-
Copy URL of the redirected address, and use the value for code, this is the authorization code for the next step.
-
Create a base64-encoded string of the following:
<CLIENT_ID>:<CLIENT_SECRET>
- Take the base64-encoded string and the authorization code, and run the following command to retrieve the refresh_token:
curl -H "Authorization: Basic <BASE_64-ENCODED_STRING>" -d grant_type=authorization_code -d code=<AUTHORIZATION_CODE> -d redirect_uri=<REDIRECT_URL> https://accounts.spotify.com/api/token