leedo / noembed

oEmbed gateway service with additional non-oEmbed sources
http://www.noembed.com
483 stars 90 forks source link

401 Unauthorized on some YouTube videos when setting zero on maxheight parameter #98

Open frumbert opened 6 years ago

frumbert commented 6 years ago

401 unauthorized:

https://noembed.com/embed?url=https://www.youtube.com/watch?v=0zic3GIcccc&maxwidth=0&maxheight=0&nowrap=on

Working:

https://noembed.com/embed?url=https://www.youtube.com/watch?v=0zic3GIcccc&maxwidth=854&maxheight=480&nowrap=on

oddly enough, also working

https://noembed.com/embed?url=https://www.youtube.com/watch?v=WR_hCMR2Xvc&maxwidth=0&maxheight=0&nowrap=on

Seems from my testing that setting maxwidth=0, maxheight=0 on videos marked as unlisted can cause 401 unauthorized to appear. If a value > 0 is used on the same url, the problem doesn't manifest, nor does it manifest of listed videos (in my testing).

ferrolive commented 6 years ago

I had the same problem and I noticed it was the option "allow embedding" not checked. This should solve the problem.