How Can We Help?
Adding a Youtube API Key
Recently Google and YouTube began restricting traffic from several major data centers, including Digital Ocean (which is used by Reclaim Hosting) and Amazon AWS. As a result, an API key is required to import YouTube videos. Due to YouTube and Google’s terms of service, Mukurtu developement is not able to provide or distribute API keys.
This is dependent on hosting provider, and does not affect all Mukurtu sites. If you do not see the above error when attempting to import a YouTube video, your site is unaffected and an API key is not required at this time (although Google and YouTube may enforce this requirement more broadly in the future).
Please note that this is not a unique error message, and the same error will be displayed if you enter an invalid ID/URL, or attempt to import a video with YouTube privacy restrictions.
Notes and more information
- We make every effort to keep our documentation up to date, but if Google changes their workflow or interface, this may no longer be accurate and you should refer to Google’s own documentation for the more current information.
- https://cloud.google.com/docs
- https://developers.google.com/youtube/v3/getting-started
- https://developers.google.com/youtube/registering_an_application
- Best practices for securely using API keys – API Console Help (google.com)
- Please note that YouTube/Google does not appear to support restricted keys with the SCALD media module used in Mukurtu 3.
- Google Cloud requires that you provide valid billing information. It is unlikely that most sites will reach a threshold where you are actually billed for this service, but we cannot guarantee that.
- Drupal SCALD module documentation: https://www.drupal.org/project/scald_youtube
Activate Google Cloud account
You can use an existing Google account, or create a new Google account if required.
Go to https://cloud.google.com/ and click on “start free”.
Confirm your account information and click “agree & continue”.
Enter your account and billing information, and click “start free”.
Create a new project
You should be redirected back to the Google Cloud dashboard. If not, go to https://cloud.google.com/. Click “Select a project”.
In the pop-up, click “new project”.
Enter a project name and click “create”. You can use the name of your site, or any other name your prefer.
You will be redirected to the dashboard and a notification will be displayed.
Add and configure YouTube API
If your project is not already selected, select it from the top menu. Then click on “APIs & Services”.
Click on “Library”.
Search for “YouTube” and select “youtube data api v3”.
Click on “YouTube Data API v3” in the search results.
Click “Enable”.
Click “Create credentials”.
Select “YouTube Data API v3” and “Public data”, then click “next”.
Copy the API Key and click “Done”. Please note that YouTube/Google does not appear to support restricted keys with the SCALD media module used in Mukurtu 3.
If you need to access your API Key or settings again in the future, selecting the project and navigating to the “credentials” tab will allow you to show and copy the key.
Add YouTube API Key to Mukurtu site
As a drupal administrator, go to /admin/structure/scald/video (eg: https://mysite.com/admin/structure/scald/video).
Expand the “Scald YouTube Configuration” menu.
Paste the YouTube API Key. Click Save.
The page will reload and a confirmation message will display. You should now be able to import YouTube videos.