alex
alex

Reputation: 109

Getting oembed using YoutubeURL returns 403 Forbidden

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

Upvotes: 7

Views: 2876

Answers (1)

runxc1 Bret Ferrier
runxc1 Bret Ferrier

Reputation: 8233

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.

Upvotes: 1

Related Questions