-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recommendation invalid request #290
Comments
Looks like you didn't get token authorization for the session. The error message says "no token provided" |
I think that is because you have to put at least one of these parameters in the request:
|
@JessicaMartini212887 is correct, we need to update the doc accordingly |
At least one is enough? I tried just by giving the seed track. And I still got an error stating 'invalid request'. Or should we give more than one track_id? |
@AkiMosi can you please share the exact request being made + full stacktrace/error And does that same request work if you try it on this web UI? https://developer.spotify.com/console/get-recommendations/ |
I found what I did wrong with the code, by going through issue #305 Thanks for your quick response, and it would be great if you add a little code snippet in the examples of the documentation. |
Cool! Please feel free to open a PR to add an example Just for reference, since this is about types I'm linking this issue #439 |
When attempting to pull down recommendations, I am getting the following error:
I followed the API documentation, here is the script generating the error:
|
My apologies, the issue isn't answered of in that comment, hence the post. However, I realize the problem now. The artist list must be comprised of artist IDs, not artist names. Thanks. |
when making a recommendations request such as:
recommend = sp.recommendations(target_energy = 0.5)
I get the error:
Traceback (most recent call last):
File "script.py", line 62, in
recommend = sp.recommendations(target_energy = 0.5)
File "/usr/local/lib/python2.7/dist-packages/spotipy/client.py", line 804, in recommendations
return self._get('recommendations', **params)
File "/usr/local/lib/python2.7/dist-packages/spotipy/client.py", line 146, in _get
return self._internal_call('GET', url, payload, kwargs)
File "/usr/local/lib/python2.7/dist-packages/spotipy/client.py", line 124, in _internal_call
headers=r.headers)
spotipy.client.SpotifyException: http status: 400, code:-1 - https://api.spotify.com/v1/recommendations?target_energy=0.5&limit=20:
invalid request
any particular reason why this is giving an invalid request?
The text was updated successfully, but these errors were encountered: