Skip to content

Instantly share code, notes, and snippets.

@vandycknick
Created January 6, 2017 13:22
Show Gist options
  • Save vandycknick/1b70e815dd1e5cdf4e889f23ef7d9d79 to your computer and use it in GitHub Desktop.
Save vandycknick/1b70e815dd1e5cdf4e889f23ef7d9d79 to your computer and use it in GitHub Desktop.

SpotifyAPI

GetOAuthKey

curl -i https://open.spotify.com/token

GetCsrf

-https curl -i -H "Origin: https://open.spotify.com" "https://api.spotilocal.com:4370/simplecsrf/token.json"

GetStatus

curl -i -H "Origin: https://open.spotify.com" "https://api.spotilocal.com:4370/remote/status.json?oauth=NAowChgKB1Nwb3RpZnkSABoGmAEByAEBJQ_hsFcSFFNsQ5OIcwP7X9B1-LpUhrAJIhdm&csrf=681df613016ab7daf68c40b41ea0b43a&return_after=59&returnon=login%2Clogout%2Cplay%2Cpause%2Cerror%2Cap"

GetVersion

curl -i -H "Origin: https://open.spotify.com" "https://api.spotilocal.com:4370/service/version.json?service=remote"

Open client

curl -i -H "Origin: https://open.spotify.com" "https://api.spotilocal.com:4370/remote/open.json?oauth=NAowChgKB1Nwb3RpZnkSABoGmAEByAEBJQ_hsFcSFFNsQ5OIcwP7X9B1-LpUhrAJIhdm&csrf=681df613016ab7daf68c40b41ea0b43a"

Play song

curl -i -H "Origin: https://open.spotify.com" "https://api.spotilocal.com:4370/remote/play.json?oauth=NAowChgKB1Nwb3RpZnkSABoGmAEByAEBJQ_hsFcSFFNsQ5OIcwP7X9B1-LpUhrAJIhdm&csrf=681df613016ab7daf68c40b41ea0b43a&uri=spotify:album:6eWtdQm0hSlTgpkbw4LaBG&context=spotify:album:6eWtdQm0hSlTgpkbw4LaBG"

Pause song

-pause curl -i -H "Origin: https://open.spotify.com" "https://api.spotilocal.com:4370/remote/pause.json?oauth=NAowChgKB1Nwb3RpZnkSABoGmAEByAEBJQ_hsFcSFFNsQ5OIcwP7X9B1-LpUhrAJIhdm&csrf=681df613016ab7daf68c40b41ea0b43a&pause=true" -unpause curl -i -H "Origin: https://open.spotify.com" "https://api.spotilocal.com:4370/remote/pause.json?oauth=NAowChgKB1Nwb3RpZnkSABoGmAEByAEBJQ_hsFcSFFNsQ5OIcwP7X9B1-LpUhrAJIhdm&csrf=681df613016ab7daf68c40b41ea0b43a&pause=false"

Adjust volume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment