{"library":"spotify-token","title":"Spotify Token","type":"library","description":"Python wrapper for fetching Spotify Webplayer access tokens, useful for interacting with the Spotify Webplayer API. Current version 1.0.0. Low maintenance cadence.","language":"python","status":"active","last_verified":"Sat May 09","install":{"commands":["pip install spotify-token"],"cli":null},"imports":["from spotify_token import SpotifyToken"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/enriquegh/spotify-webplayer-token","docs":null,"changelog":null,"pypi":"https://pypi.org/project/spotify-token/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"from spotify_token import SpotifyToken\n\n# You need a valid Spotify client token (from webplayer session)\nclient_token = os.environ.get('SPOTIFY_CLIENT_TOKEN', '')\nst = SpotifyToken(client_token)\ntry:\n    access_token = st.get_access_token()\n    print(f\"Access token: {access_token}\")\nexcept Exception as e:\n    print(f\"Error: {e}\")","lang":"python","description":"Instantiate SpotifyToken with a client token and fetch an access token.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}