Getting oembed using YoutubeURL returns 403 Forbidden

Viewed 1474

For A few days, I have suddenly become receiving the 403 Forbidden response from https://www.youtube.com/oembed?url={youtubeURl}.

I have checked documents for Youtube API but I can't find that it has restrictions for getting oembed and has authorization too. I can only see a restriction for Youtube Data API.

Why do I get the 403 Forbidden response from this API...?

Sample sending request:

https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=qK5tNXJ6Ibo
1 Answers

Are you sure that you are making the requests as https ? The code I have been using is fairly legacy and when I went down through it the requests were http. Once I updated the code to make the call over https it stopped getting 403 errors. Seems this was just recently changed a couple days ago.

Related