How to Create a YouTube JavaScript API Key

Documentation for Joomla 3

Shack Toolbox Pro is the best Joomla extension to display a YouTube channel or playlist or user in your Joomla site.

In the next image, you can see the "Joomlashack User Groups" playlist embedded in a Shack Toolbox Pro popup. As any Joomla module, you can also display YouTube channel/playlist/user with Shack Toolbox in any other place in your site:

joomlashack playlist inside the youtube gallery popup

To do this, you will need to use the "YouTube Gallery" box:

use the youtube gallery box

In this document, you will learn how to create a YouTube JavaScript API Key required for the "YouTube Gallery" box to work:

the api key field

For this demonstration, the "Joomlashack User Groups" YouTube playlist will be displayed in a Shack Toolbox popup.

Let's get started.

  • Log in to your Google Mail account.
  • Go to Google's API console at console.developers.google.com.
  • You will be taken to the Google APIs Dashboard, as you can see in the next image. Click "CREATE PROJECT":

click create project

  • You will see the "New Project" page. Enter your project name into the "Project name" field and click "CREATE":

enter your project name and click create

  • You will see the "Notification" popup with the success message in the top right corner, see the next image. Click anywhere outside this popup to close it:

project created notification

  • Click "ENABLE APIS AND SERVICES":

click enable apis and services

  • You will be taken to Google's API Library. Scroll down and click "YouTube Data API v3":

click youtube data api v3

  • You will see the "YouTube Data API v3" page. Click "Enable":

click enable

  • After a brief activity in your browser, you will see the control panel of your YouTube Data API. Click "CREATE CREDENTIALS" in the top right corner:

click create credentials

  • You will see the "Add credentials to your project" page. Click "API key":

click api key

  • This will bring you to the "API key" page, as you can see in the next image. Enter your API key name into the "Name" field, click "HTTP referrers" and then click "Create":

enter api name click http referrers click create

  • This will bring you back to the "Credentials" page with your new API key displayed. Click the small icon to the right of your API key to copy the key:

click the small icon to the right of the api key

  • Go back to your Joomla administrator panel > your Shack Toolbox module > tab "Module". Enter the copied API key into the "API Key" field:

the api key field

  • Click "Save" or "Save & Close". 

When you check your module, you will see your selected YouTube channel/playlist/user inside the Shack Toolbox/YouTube Gallery module/popup:

joomlashack playlist inside the youtube gallery popup