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
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With