SHARE
TWEET

Untitled

a guest Apr 18th, 2019 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash    
  2. client_id=YOUR CLIENT ID
  3. RESPONSE_TYPE=code    
  4. client_secret=YOUR CLIENT SECRET
  5. REDIRECT_URI=https://hahay.es/spotifyc    
  6. 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"
  7. echo "htps://accounts.spotify.com/authorize?client_id=$client_id&response_type=$RESPONSE_TYPE&redirect_uri=$REDIRECT_URI&scope=$SCOPES"
  8. echo    
  9. read -p "Enter code attached to URL in browser: " code    
  10. 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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top