mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #483] current_user_top_tracks throwing 403 #283
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#283
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 @tizonia on GitHub (Apr 26, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/483
Hi,
I'm using spotipy-2.11.2 and
spotify_tokento authenticate like this:Not sure if I'm doing something wrong here:
spotify.current_user_saved_tracks(limit=50, offset=0)works perfectly fine.spotify.current_user_top_tracks(limit=50)is throwing an exception:Thanks!
@stephanebruckert commented on GitHub (Apr 26, 2020):
Hello,
spotify.current_user_top_tracks()works for me. It's doing aGETtohttps://api.spotify.com/v1/me/top/tracks?time_range=medium_term&limit=50&offset=0and returns 50 tracksMaybe it was a transient error?
@tizonia commented on GitHub (Apr 26, 2020):
Still not working here...
@tizonia commented on GitHub (Apr 26, 2020):
current_user_top_artistsis throwing the same error:@tizonia commented on GitHub (Apr 26, 2020):
current_user_recently_playedis working OK@stephanebruckert commented on GitHub (Apr 27, 2020):
Is your token using the scope
user-top-read? https://developer.spotify.com/documentation/general/guides/scopes/@tizonia commented on GitHub (Apr 27, 2020):
@stephanebruckert
Thanks!, this was the problem. I was not setting the necessary scope. I'm still learning about the scopes and how to use them.
Is there a way to retrieve the daily mixes or the discover weekly playlist?
@ritiek commented on GitHub (Apr 28, 2020):
Spotify does not provide a special way to access these playlists. You'll need to iterate on a user's available playlists yourself and check for a playlist with the name "Discover Weekly" (or ones with the daily mix names) owned by "Spotify" user.
You also might want to use the scope
playlist-read-privatesince these playlists are private by default.@tizonia commented on GitHub (Apr 29, 2020):
@stephanebruckert / @ritiek
Thanks, I've been able to access the daily mixes and the discover weekly using the read-private scope. But I noticed that I had to 'like' them to make them show up in the list returned by Spotify.