Python wrapper for Spotify Webplayer access token
Utility script to get Spotify’s web player access token which has more permissions than the normal one that can be obtained through the Spotify API.
pip install spotify_token
To obtain the cookies (valid for 1 year):
- Open a new Incognito window in Chrome (or another browser) at https://accounts.spotify.com/en/login?continue=https:%2F%2Fopen.spotify.com%2F
- Open Developer Tools in your browser (might require developer menu to be enabled in some browsers)
- Login to Spotify.
- Search/Filter for get_access_token in Developer tools under Network.
- Under cookies for the request save the values for sp_dc and sp_key.
- Close the window without logging out (Otherwise the cookies are made invalid).
An access token can be obtained by running the following:
import spotify_token as st data = st.start_session("sp_dc","sp_key") access_token = data expiration_date = data
This project is licensed under the MIT License - see the LICENSE file for details
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size spotify_token-1.0.0-py2.py3-none-any.whl (3.5 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size spotify_token-1.0.0.tar.gz (2.4 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for spotify_token-1.0.0-py2.py3-none-any.whl