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

Youtube quota exceeded #34

Open
Bertagit opened this issue Jul 10, 2020 · 5 comments
Open

Youtube quota exceeded #34

Bertagit opened this issue Jul 10, 2020 · 5 comments

Comments

@Bertagit
Copy link

After some time we load youtube videos the plugin stop with an error, the youtube quota for the api key is exceeded, updating the key in the /helpers/import.php solve the error. I think theat the key must be a configuration parameter, like video dimensions, in omeka backend, this will avoid the error will appears by the user and every user will use his own api key

@Bubbletalk
Copy link

Hi there Bertagit : ) I see you are experiencing a similar issue :

Error importing video. Error calling GET https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails%2Cplayer%2Cstatus%2CrecordingDetails&id=ACX993ZmEI0&maxResults=1&key=AIzaSyDI8ApsA7MBIK4M1Ubs9k4-Rk7_KOeYJ5w: (403) The request cannot be completed because you have exceeded your quota.

What is the getting started quota? I was using YouTube Import Plugin v1.1.11 without any issues until recently. I configured the display options as suggested 640 X 360 / 100%, but still the same issue. I then updated to v1.3 but the error persists. I'm using the Omeka Thanks, Roy Theme. I have not installed any other new plugins. Any suggestions for how to fix? Please : )

@Bertagit
Copy link
Author

Hi Bubbletalk, there is only one solution to solve the issue but you need to modify a configuration file of the plugin.

  1. You need a valid google account;
  2. Login with your google acocunt into Google API dashboard ;
  3. Find the Youtube Data API V3 and open it;
  4. Now you can create a personal key for your google account, click on ENABLE;
  5. In the left menu click on "Credentials" (the last menu label), and "Create credentials"
  6. After this you will have an API Key, you need that in the successive steps

Now you need to have access at your omeka instalaltion. Go to the omeka_installation_dir/plugins/YouTubeImport/helpers ;
in this directory you have only one file named import.php, open it with a editor and find the line where the variable $youtube_api_key is defined
public static $youtube_api_key = ' the-youtube-key '
Now you have to replace the existing key with to one generated at the step 5 and save; now go to your omeka admin panel and you can use the Youtube plugin.

The problem is the default key used by plugin, every google API service, like youtube, associate a key to a quota, if every one who have the plugin use the same key the quota is shared between every user, if you generate your key you have your own quota.
I hope this can help

@Bubbletalk
Copy link

Many Thanks Bertagit : ) This fix works perfectly!!!! Add Credentials to your project: YouTube Data API V3 Under where will you be calling the data from? I chose: Web Server, Under what data will you be accessing? I chose: Public Data

Your Step by Step instructions are much appreciated : ) The YouTube Import Plugin is a fantastic plugin : ) Keeps my database lightweight and speeds up the process of inputting data for each field in the record : ) Hats off to you Bertagit for figuring it out : )

@Bubbletalk
Copy link

Hi Bertagit,
I've posted a link to your fix for the YouTube Import Plugin on my post "Tunnelvision"on the omeka forum: https://forum.omeka.org/t/youtube-import-video-plugin-error/11391 Many Thanks : )

@tomroguk
Copy link

I've followed the instructions to create and update the import.php file with my own API Key but still getting this error.

Error importing video. Error calling GET https://www.googleapis.com/youtube/v3/videos?part=id%2Csnippet%2CcontentDetails%2Cplayer%2Cstatus%2CrecordingDetails&id=-hw4UOL7yNY&maxResults=1&key=[My API ky]: (403) The request cannot be completed because you have exceeded your quota.

Are there any other updates I should make or can try to get this working?
Many thanks

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

3 participants