spotipy-anon

raw JSON →
1.5.7 verified Sat May 09 auth: no python

An extension to Spotipy that enables anonymous access to the Spotify Web API without requiring a Spotify developer account. Version 1.5.7 uses TOTP-based token generation via external secrets. Active development with frequent releases.

pip install spotipy-anon
error spotipy_anon.exceptions.TokenError: Unable to retrieve token
cause TOTP secret changed or outdated library version.
fix
Update to latest version: pip install --upgrade spotipy-anon
error AttributeError: module 'spotipy_anon' has no attribute 'SpotifyAnon'
cause Using wrong class name or import path.
fix
Use: from spotipy_anon import SpotifyAnon
breaking Version 1.4 introduced TOTP-based token generation. Old versions without TOTP stopped working. Upgrade to >=1.4.
fix pip install --upgrade spotipy-anon
deprecated The 'spotify_secrets' parameter in initialization is deprecated. TOTP secrets are now fetched automatically.
fix Remove 'spotify_secrets' argument when creating SpotifyAnon instance.
gotcha Anonymous access may be rate-limited or blocked by Spotify at any time. Tokens are shared and could be revoked. For production, use official authentication.
fix Consider using spotipy with client credentials flow.

Initialize a SpotifyAnon client and perform a search without authentication.

from spotipy_anon import SpotifyAnon

sp = SpotifyAnon()
results = sp.search(q='Never Gonna Give You Up', type='track', limit=1)
print(results['tracks']['items'][0]['name'])