[GH-ISSUE #640] code_verifier required #380

Closed
opened 2026-02-27 23:22:18 +03:00 by kerem · 4 comments
Owner

Originally created by @nsier on GitHub (Feb 11, 2021).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/640

Hi all,

Apologies if this ends up being a silly question, but Im having trouble receiving a token and getting a .cache file.

All Environmental variables seem to be good and everything on the developer portal looks OK.

the error Im receiving is:

File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 1633, in devices
return self._get("me/player/devices")
File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 291, in _get
return self._internal_call("GET", url, payload, kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 221, in _internal_call
headers = self._auth_headers()
File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 212, in _auth_headers
token = self.auth_manager.get_access_token(as_dict=False)
File "/home/pi/.local/lib/python3.7/site-packages/spotipy/oauth2.py", line 508, in get_access_token
error_description=error_payload['error_description'])
spotipy.oauth2.SpotifyOauthError: error: invalid_request, error_description: code_verifier required

any thoughts would be welcomed.

thanks

Originally created by @nsier on GitHub (Feb 11, 2021). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/640 Hi all, Apologies if this ends up being a silly question, but Im having trouble receiving a token and getting a .cache file. All Environmental variables seem to be good and everything on the developer portal looks OK. the error Im receiving is: File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 1633, in devices return self._get("me/player/devices") File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 291, in _get return self._internal_call("GET", url, payload, kwargs) File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 221, in _internal_call headers = self._auth_headers() File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 212, in _auth_headers token = self.auth_manager.get_access_token(as_dict=False) File "/home/pi/.local/lib/python3.7/site-packages/spotipy/oauth2.py", line 508, in get_access_token error_description=error_payload['error_description']) spotipy.oauth2.SpotifyOauthError: error: invalid_request, error_description: code_verifier required any thoughts would be welcomed. thanks
kerem 2026-02-27 23:22:18 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@Peter-Schorn commented on GitHub (Feb 20, 2021):

There's no way anyone can answer your question if you don't post any of your code.

<!-- gh-comment-id:782701069 --> @Peter-Schorn commented on GitHub (Feb 20, 2021): There's no way anyone can answer your question if you don't post any of your code.
Author
Owner

@IdmFoundInHim commented on GitHub (Mar 14, 2021):

Strange, that appears to be a call to SpotifyOAuth.get_access_token, but code_verifier is part of the SpotifyPKCE flow. Unless you know that those two are being combined (which would cause a problem), that's all I can say without the code that triggered the error.

<!-- gh-comment-id:798819394 --> @IdmFoundInHim commented on GitHub (Mar 14, 2021): Strange, that appears to be a call to `SpotifyOAuth.get_access_token`, but `code_verifier` is part of the `SpotifyPKCE` flow. Unless you know that those two are being combined (which would cause a problem), that's all I can say without the code that triggered the error.
Author
Owner

@stephanebruckert commented on GitHub (Mar 14, 2021):

@nsier do you still have this problem? if yes, please share the code so we can help

<!-- gh-comment-id:798868526 --> @stephanebruckert commented on GitHub (Mar 14, 2021): @nsier do you still have this problem? if yes, please share the code so we can help
Author
Owner

@dieser-niko commented on GitHub (May 1, 2024):

Closing as there's no activity.

<!-- gh-comment-id:2089060232 --> @dieser-niko commented on GitHub (May 1, 2024): Closing as there's no activity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#380
No description provided.