Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- client_id=YOUR CLIENT ID
- RESPONSE_TYPE=code
- client_secret=YOUR CLIENT SECRET
- REDIRECT_URI=https://hahay.es/spotifyc
- SCOPES="user-read-playback-state%20user-read-recently-played%20user-library-modify%20%20playlist-read-private%20user-read-email%20playlist-modify-public%20playlist-modify-private%20user-library-read%20playlist-read-collaborative%20user-read-private%20user-modify-playback-state%20user-follow-read%20user-top-read%20user-read-currently-playing%20user-follow-modify"
- echo "htps://accounts.spotify.com/authorize?client_id=$client_id&response_type=$RESPONSE_TYPE&redirect_uri=$REDIRECT_URI&scope=$SCOPES"
- echo
- read -p "Enter code attached to URL in browser: " code
- curl -X "POST" "https://accounts.spotify.com/api/token" -d "grant_type=authorization_code" -d "code=$code" -d "redirect_uri=$REDIRECT_URI" -d "client_id=$client_id" -d "client_secret=$client_secret" > $HOME/.spottoken
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement