Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting oembed using YoutubeURL returns 403 Forbidden

Tags:

youtube-api

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
like image 656
alex Avatar asked Dec 14 '20 05:12

alex


People also ask

What is a 403 Forbidden error?

Here are some examples of 403 error messages: Often, 403 forbidden errors are caused by an access misconfiguration on the client-side, which means you can usually resolve the issue yourself. A common cause of these errors is the file or folder permission settings, which control who can read, write, and execute the file or folder.

How do I prevent 403 errors on my website?

If you operate the website in question, and you want to prevent 403 errors in these cases, enable directory browsing in your web server software. Clear your browser's cache. Issues with a cached version of the page you're viewing could be causing 403 Forbidden issues.

What does 403 mean on a website?

Clear Your Web History/Cache 403 is an HTTP status code, which is a standard response code from the web server to the client’s browser. When there is an error, these codes communicate the cause of the problem so that users know why the page isn’t loading.

Why do I get a 403 error in Windows 10?

Reset File and Directory Permissions. Another reason for encountering a 403 Error Forbidden message is bad permissions for your files or folders. In general, when files are created, they come with certain default permissions. These basically control how you can read, write, and execute the files for your use.


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.

like image 178
runxc1 Bret Ferrier Avatar answered Oct 19 '22 03:10

runxc1 Bret Ferrier