Last active
August 3, 2018 03:54
-
-
Save wesleyegberto/a40061de408039c1f0d8a049f79b58ad to your computer and use it in GitHub Desktop.
Backup saved tracks from Spotify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://developer.spotify.com/console/get-current-user-saved-tracks | |
$token="<Your Token>" | |
# API limits 50 tracks per request, so I paginate my 1100+ musics here | |
for i in `seq 0 50 1300`; | |
do curl -k -X "GET" "https://api.spotify.com/v1/me/tracks?limit=50&offset=$i" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $token" >> musics.json; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment