mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 23:36:00 +03:00
[GH-ISSUE #239] Can't authenticate #186
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#186
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 @thomasaldershof on GitHub (Dec 5, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/239
Hello all,
I'm trying to like all songs in a playlist but I keep getting a 403 error. Tried it with Chrome and Firefox headers.
I assume the playlist id is the part after /playlist?list=
Here is my code, hopefully you guys can help me.
`from ytmusicapi.ytmusic import YTMusic
YTMusic.setup(filepath='headers_auth.json')
ytmusic = YTMusic('headers_auth.json')
ytmusic.rate_playlist(playlistId='PL_5iVIEaUI3-mEdwiXDm7e_OTrIIBSo13', rating='LIKE')`
This is the error:
Exception: Server returned HTTP 403: Forbidden.
The caller does not have permission
PS. I don't have a lot of Python experience.
@sigma67 commented on GitHub (Dec 5, 2021):
The code is fine, 403 means that there is an issue with your credentials. Do you have multiple YouTube Music accounts (brand accounts)? If you want me to debug for you, send your
headers_auth.jsonto ytmusicapi@gmail.com@thomasaldershof commented on GitHub (Dec 5, 2021):
Thanks, I will send you an email with the json file. As far as I can see there I don't have a brand account.
@sigma67 commented on GitHub (Dec 5, 2021):
Oh, well now it's obvious. You're trying to add your own playlist to your library, which is obviously impossible.
rate_playlistis meant for adding others' playlists to your library.https://ytmusicapi.readthedocs.io/en/latest/reference.html?highlight=rate_playlist#ytmusicapi.YTMusic.rate_playlist
Your credentials are working fine :) Feel free to log out and log back in to invalidate the credentials you sent me.
@thomasaldershof commented on GitHub (Dec 5, 2021):
Ah thanks, I thought it was used for rating the whole play list liked (so every song). Do you have an idea for that?
@sigma67 commented on GitHub (Dec 5, 2021):
@thomasaldershof commented on GitHub (Dec 5, 2021):
Thanks! Had to run it about 20 times but all songs are liked now!