Help Wizard

Step 1


INVALID_CLIENT: invalid client

INVALID_CLIENT: invalid client

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"
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

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 😕

1 Reply

**bleep**. I feel so stupid. I must have checked it a thousand times and still got a typo. There is one "2" that somehow got changed into "w" in the client_id parameter. I have no idea how I managed to do it since I tried copy-pasting it to be sure that I didn't actually make a typo.

Anyway, it seems that's solved.

Suggested posts