INVALID_CLIENT: invalid client
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to develop a test app using Python and spotipy.
Everything worked fine yesterday. But today when the app tries to obtain a token, I'm getting a browser window opened saying "INVALID_CLIENT: Invalid client".
The actual code looks like this:
import spotipy
[...]
scope="playlist-read-collaborative playlist-modify-public playlist-read-private playlist-modify-private user-read-email user-read-private user-library-modify user-library-read"
spotify=spotipy.Spotify(auth_manager=spotipy.SpotifyOAuth(
client_id='1de87466we774e0a913abbe49181e718',
client_secret='<my_secret_here>',
scope=scope,
redirect_uri="http://127.0.0.1:9009/"))
[...]
playlist=spotify.user_playlist_create('<myuser>',"Test playlist 1",public=True)
[...]
As soon as I reach the playlist creation part, the library notices that it doesn't have current token so it tries to authenticate me to get one.
It ends with browser opening a window for
https://accounts.spotify.com/authorize?client_id=1de87466we774e0a913abbe49181e718&response_type=code&redirect_uri=http%3A%2F%2F127.0.0.1%3A9009%2F&scope=playlist-read-collaborative+playlist-modify-public+playlist-read-private+playlist-modify-private+user-read-email+user-read-private+user-library-modify+user-library-read
with said "INVALID_CLIENT: invalid client" message from a 400 Bad Request response.
The client id is the proper one - I did copy-paste it from my dashboard and I checked it several times. The secret also is OK (I even reset the secret just to be on the safe side).
The most interesting thing is that I think it used to work properly and now it's not working.
I thought that maybe the app got temporarily blocked because of hitting rate limits but as far as I know, the urllib3 on which spotipy is built honors the 429 and Retry-After header. Anyway I'd expect a 429 response instead of a 400 Bad Request
Any ideas? Because I'm stuck here ๐
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page