Benjamin-Loison / YouTube-operational-API

YouTube operational API works when YouTube Data API v3 fails.
397 stars 50 forks source link

YouTube operational API no key service returns "run out of quota" when provide an incorrect YouTube Data API v3 endpoint #13

Open Benjamin-Loison opened 2 years ago

Benjamin-Loison commented 2 years ago

Got

The request cannot be completed because the YouTube operational API run out of quota. Please try again later.

When reaching https://yt.lemnoslife.com/noKey/subscribers?part=snippet&channelId=UCv_LqFI-0vMVYgNR3TeB3zQ While https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&channelId=UCv_LqFI-0vMVYgNR3TeB3zQ&key=API_KEY works fine.

The problem is that when using an incorrect YouTube Data API v3 endpoint as subscribers instead of subscriptions, it displays "run out of quota" while it's not the case, relaying the YouTube Data API v3 error that the endpoint is incorrect would make sense, otherwise we could put up a whitelist of YouTube Data API v3 endpoints by using https://developers.google.com/youtube/v3/docs

However for relaying the YouTube Data API v3 error, it seems that in this case the official API just returns a 404 error with an empty while it's not the case for #27.

Otherwise this URL should in theory work but this channel seems special and so it doesn't work: https://yt.lemnoslife.com/noKey/playlistsItems?part=snippet&playlistId=UUNbg-_aV3kK4MEb2vgdBtsw

Benjamin-Loison commented 1 year ago

Maybe this can lead to DoS.