Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 error #66

Open
maria-pro opened this issue Dec 30, 2018 · 26 comments
Open

403 error #66

maria-pro opened this issue Dec 30, 2018 · 26 comments

Comments

@maria-pro
Copy link

i am able to pass authentication with yt_oauth but when I try to do get_channel_stats or list_channel_resources it returns: "Error: HTTP failure: 403"

get_channel_stats(channel_id="UCMtFAi84ehTSYSE9XoHefig")

Can you help?
ty

@gowiththeflow8714
Copy link

It started happening with me too. The interesting in it is that a few hours before the same script worked totally fine and then all of a sudden I get the HTTP failure: 403.
I genuinely have no idea, why.

@subasish
Copy link

Getting same 403 error. :(

@gowiththeflow8714
Copy link

It is curious because after putting it to rest yesterday, today it worked again for 3 calls - and then the HTTP failure: 403 came again.

@gowiththeflow8714
Copy link

So I figured out, why this is happening. If you exceed your daily quota limit, you get this HTTP failure 403. However, the daily quota resets itself every day (midnight, pacific time).
You can calculate your quota with a quota calculator here:
https://developers.google.com/youtube/v3/determine_quota_cost
and you can check your past API requests in your google console dashboard.
cheers

@FAD28
Copy link

FAD28 commented Aug 15, 2019

I get the same error when requesting and it is not due to the daily request quota. It generally doesn't work anymore. Worked smoothly for a long time. Recently but not any more. What could be the reason?

@FAD28
Copy link

FAD28 commented Aug 15, 2019

Tansania_coments <- get_all_comments(video_id = "J4wf02KbZRA")
Returns: "Error: HTTP failure: 403"

@shaylafolson
Copy link

I am now having the same issue with "get_all_channel_stats()." It is not due to the daily quota, as I haven't used it in the past 2 days.

@cristian1204
Copy link

cristian1204 commented Oct 30, 2019

I installed tuber today. I really enjoyed its functions. However, now all returns are "Error: HTTP failure: 403". Why?

I also tried use
library(devtools); devtools::install_github("soodoku/tuber", build_vignettes = TRUE)`
but the error remains.

@cristian1204
Copy link

I get the same error when requesting and it is not due to the daily request quota. It generally doesn't work anymore. Worked smoothly for a long time. Recently but not any more. What could be the reason?

Perhaps you used all of your daily quota. It is possible to use 10000 queries per day. You can solicite more quotes send a request for Youtube.

@sverhees
Copy link

sverhees commented Nov 8, 2019

I constantly get the 403 error after ~4,5 queries, each of which return around 600 results. That is not even close to the limit.

What works for me as a temporary fix is to remove the .httr-oauth file that caches login data, restart R, and then log back in with the same credentials. Sometimes I have to wait for some time in between queries. Not sure if this error is coming from the Google API for some reason or other, or if it has to do with the package, but it makes working with tuber incredibly tedious.

@lucasdedavid
Copy link

Hi, I'm having the same problem. I managed to auth, but couldn't get stats on a list of video that I had already done before. Is somebody having the same issue?

@muschellij2
Copy link
Collaborator

Can you please post a reprex

@RussellGrayxd
Copy link

@muschellij2 There is literally no need for a reprex in this case. the error is called after authentication with even the documentation examples. Use the documentation itself as a reprex.

@RussellGrayxd
Copy link

Here, since you're giving a thumbs down for a factual statement regarding your request for a reprex:

app_id <- "myuniqueappidthatIwillnotposthere"
app_secret <- "myappsecretthatIwillnotposthere"
yt_oauth(app_id = app_id, app_secret = app_secret, token = "")

script from the documentation

tuber::yt_search(term = "Barack Obama")

Error: HTTP failure: 403
The request cannot be completed because you have exceeded your quota.

I have not used this function for over a month, and since I tried it 2 days ago, it has not worked once. So there is no way I have gone over my available quota. Yesterday it just said "Erro 403", now it is giving a different error, but still the same lack of results.

@muschellij2
Copy link
Collaborator

muschellij2 commented Dec 30, 2020

  1. this is a non-funded project for me, so respect developer's time if you want a response in the future. You are clearly not a developer.
  2. Please read what an MCVE is because that clearly is not one.

I had the same issue. I had to start a new project because I believe there are issues with quotas for youtube API limits because of the changes to the API over time. Please start a new GCP project, enable YouTube APIs and then retry.

Go to https://console.cloud.google.com/iam-admin/quotas and ensure that all are in green:
Screen Shot 2020-12-30 at 10 20 14 AM
and check each one to make sure none are at zero.

@RussellGrayxd
Copy link

RussellGrayxd commented Dec 30, 2020 via email

@muschellij2
Copy link
Collaborator

muschellij2 commented Dec 30, 2020 via email

@RussellGrayxd
Copy link

RussellGrayxd commented Jan 2, 2021 via email

@muschellij2
Copy link
Collaborator

muschellij2 commented Jan 3, 2021 via email

@RussellGrayxd
Copy link

RussellGrayxd commented Jan 4, 2021 via email

@muschellij2
Copy link
Collaborator

muschellij2 commented Jan 4, 2021 via email

@RussellGrayxd
Copy link

Tried your suggestion and this also didn't work.

I just ran a query using the API key with vosomSML and it worked without issue. So I have narrowed the issue down to using the API oauth with app id and app secret. I have deleted my projects and started new ones with new app_id and app_secret, I have checked the limits and they're fine. I have done literally everything I can think of and nothing has worked.

I guess I will have to wait for @soodoku to respond

@carlinstarrs
Copy link

I was having this same problem, and it was due to hitting quota limits instantaneously. I think it is related to this:

https://stackoverflow.com/questions/63211098/youtube-data-api-the-request-cannot-be-completed-because-you-have-exceeded-your

Creating a new project didn't work on its own -- I also had to shut down my inactive project. Hopefully that works for someone else.

@lucasdedavid
Copy link

Hi, does anyone have a follow-up on this? I have been trying to collect data, but I always get a 403, even after deleting and creating again the apps. For the solutions proposed here, we don't seem to have it fixed.

@fonva
Copy link

fonva commented May 29, 2021

@lucasdedavid
En este link comento lo que creo que es la razón del error: #15

Me parece que por cambio de política de youtube la cuota definida está en 0.

Para aumentarla parece que es necesario asociar una cuenta de Facturación.

Aprecio que lo puedan confirmar.

@HohnerJulian
Copy link

I also experienced the same issue, even though quota was definetely not reached. One thing I discovered that seems to solve the issue (at least for me) was to not scrape bigger amounts of data at once, and more importantly, not too frequent.

If you take a look at your google dashboard for the app you are using, you can observe the traffic you are causing. I assume if you reach a traffic cap, google blocks you until the quota is resetted. My advice therefore would be to download data by (small) waves. You can do this manually or by implenting "sys.sleep()" before your scrape-commands.

Traffic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests