[PR #832] [CLOSED] Fixes "Only valid bearer authentication supported, reason: None" #1034

Closed
opened 2026-02-28 00:03:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/832
Author: @stephanebruckert
Created: 6/19/2022
Status: Closed

Base: masterHead: fix-token-as-dict


📝 Commits (1)

  • 43b2c2b get_access_token() to return token instead of dict by default

📊 Changes

6 files changed (+9 additions, -7 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 examples/app.py (+1 -1)
📝 spotipy/client.py (+2 -2)
📝 spotipy/oauth2.py (+2 -2)
📝 spotipy/util.py (+1 -1)
📝 tests/unit/test_oauth.py (+1 -1)

📄 Description

Fixes https://github.com/plamere/spotipy/issues/687, https://github.com/plamere/spotipy/issues/828


To keep backward-incompatibility we shouldn't have made as_dict=True the default in get_access_token methods. This PR swaps it back to False. Therefore this must be seen as a bugfix rather than a new backward-incompatible change.

Normally, this shouldn't have too much effect on new code as we now don't recommend to get the token independently via get_access_token() in order to authenticate (see README).

If you have been using get_access_token() in new code, you should now use get_access_token(as_dict=True).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/832 **Author:** [@stephanebruckert](https://github.com/stephanebruckert) **Created:** 6/19/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-token-as-dict` --- ### 📝 Commits (1) - [`43b2c2b`](https://github.com/spotipy-dev/spotipy/commit/43b2c2b2b46a80825801f2738b88599baca9ae9f) get_access_token() to return token instead of dict by default ### 📊 Changes **6 files changed** (+9 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `examples/app.py` (+1 -1) 📝 `spotipy/client.py` (+2 -2) 📝 `spotipy/oauth2.py` (+2 -2) 📝 `spotipy/util.py` (+1 -1) 📝 `tests/unit/test_oauth.py` (+1 -1) </details> ### 📄 Description Fixes https://github.com/plamere/spotipy/issues/687, https://github.com/plamere/spotipy/issues/828 ------------ To keep backward-incompatibility we shouldn't have made `as_dict=True` the default in `get_access_token` methods. This PR swaps it back to `False`. Therefore this must be seen as a bugfix rather than a new backward-incompatible change. Normally, this shouldn't have too much effect on new code as we now don't recommend to get the token independently via `get_access_token()` in order to authenticate (see README). If you have been using `get_access_token()` in new code, you should now use `get_access_token(as_dict=True)`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:20 +03:00
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#1034
No description provided.