mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #494] 400 - Bad Request on oauth2.get_access_token #292
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#292
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CAAAR12 on GitHub (May 19, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/494
Hello, I have the latest release (2.12.0). I was running the example to list tracks and artist name just to pass client authentication variables (ID, secret) and redirect_uri as strings directly from the code instead of my environment variables as a quick test. However when I run, I get the traceback shown at the bottom. I can sign into Spotify and get redirected to the uri normally (authentication successful), but I can't seem to get the post successful for the access token from the function get_access_token.
I verified both Client ID and Client Secret match the Spotify developer ones
The redirect uri I specified on Spotify developer is http://localhost:8001, which also matches my passed string in the code.
"Authorization Code" passed in the payload matches the code in redirect_uri.
Not familiar with b64 and ascii decoding, so I can't verify if the heading is correct. Based on the Client ID and Client Secret matching Spotify developer I would assume it is correct.
Any ideas what I'm doing wrong or if it's a bug? Help would be appreciated! Thank you for providing this!!!!
(I used some print lines to verify some of the payload inputs, which is why it point to line 445. On the stock, it should show line 436.)
My Code:
@stephanebruckert commented on GitHub (May 19, 2020):
Hey @CAAAR12,
This works for me but I'm not using Windows. It looks like a bunch of issues are being discovered on Windows only recently. Any chance you can help find which version of spotipy was fine for your problem?
Please follow this https://github.com/plamere/spotipy/issues/493#issuecomment-631103985, looking forward to your help on this
@CAAAR12 commented on GitHub (May 19, 2020):
Thanks @stephanebruckert for the quick response. I just downgraded to 2.11.2 per your recommendation (I tried 2.11.0 first but it defaulted install 2.11.2) and its working great now. As for the solution to why , I haven't seen the changes from 2.11 to 2.12 yet. I'm curious to know the solution. Many thanks!!!
@stephanebruckert commented on GitHub (May 19, 2020):
This is very strange, I see nothing from the changes from 2.11.2 to 2.12.0 that could explain that problem. Can you try 2.12.0 again?
@CAAAR12 commented on GitHub (May 19, 2020):
Interesting.... uninstalled 2.11.2 and installed 2.12.0 and seems to work again still... Last night I uninstalled and reinstalled 2.12.0 multiple times and it was failing every time :/
Maybe it has to do with some sort of cache being saved in 2.11.2? Unless uninstalling the package removes the caches associated as well. I'm not proficient enough sorry.
@lcouto commented on GitHub (May 20, 2020):
Hi I'm running into a similar issue but when trying to get use an auth code to get a token. Please see code below
spotipy version = 2.11.1
returns a
any help is greatly appreciated.