Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Code 400 for every video #88

Closed
banzerschreck opened this issue Feb 11, 2021 · 2 comments
Closed

Error Code 400 for every video #88

banzerschreck opened this issue Feb 11, 2021 · 2 comments

Comments

@banzerschreck
Copy link

I started getting failure notifications for the script the other day and it seems that every time the script runs Youtube spits back an error code 400 for every video. For context, the only way I use this script is to add all of my subscriptions, about 20 videos per day, to my watch later playlist.

An example error message:

Thu Feb 11 18:37:36 EST 2021 Couldn't update playlist with video (KbcwC_sRG_o), ERROR: Message: [API call to youtube.playlistItems.insert failed with error: The API does not support the ability to insert videos into the specified playlist.] Details: {"message":"The API does not support the ability to insert videos into the specified playlist.","errors":[{"message":"The API does not support the ability to insert videos into the specified playlist.","reason":"playlistOperationUnsupported","location":"playlistId","domain":"youtube.playlistItem","locationType":"parameter"}],"code":400}

I last ran the script just a few minutes ago using the latest version of sheetScript.gs and unfortunately hit the API quota for today :(

Is this possibly caused by a change to the API? Is it only the watch later playlist that has broken?

Thanks for your help!

@MrNgL
Copy link

MrNgL commented Feb 12, 2021

I'm also getting the same error for the past day, I'm using the Watch Later (WL) playlist too.

ERROR_1: API call to youtube.playlistItems.insert failed with error: The API does not support the ability to insert videos into the specified playlist.

I was using an older version of the code and thought that was the problem but even after updating to the latest version I still receive the same error as OP.

Couldn't update playlist with video (<REDACTED>), ERROR: Message: [API call to youtube.playlistItems.insert failed with error: The API does not support the ability to insert videos into the specified playlist.] Details: {"message":"The API does not support the ability to insert videos into the specified playlist.","errors":[{"location":"playlistId","message":"The API does not support the ability to insert videos into the specified playlist.","domain":"youtube.playlistItem","locationType":"parameter","reason":"playlistOperationUnsupported"}],"code":400}

The problem appears to be with the Watch Later playlist, in fact I made a new playlist (private), changed it into the sheet and the script runs fine, I guess google made some changes regarding the ability to add videos to the WL playlist.

Edit: It appears from this stackoverflow answer that the playlistItems.insert and delete methods are fully deprecated for the WL playlist. Too bad as the WL list was my default playlist as it has the remove watched feature already available without having to use JS code to remove videos, plus it seems that with a different playlist from the WL one I always hit the API quota but this might be a problem on my side.

@victorjzsun
Copy link
Collaborator

Yeah, looks like it's been deprecated. Nothing we can do about it.

Updated error message to be clearer: d74e693

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants