WEBVTT

00:04.640 --> 00:09.160
The first step to get a YouTube API key is to log in to the Google Developer Console.

00:09.600 --> 00:12.400
The link to the console is in the appendix of the section.

00:12.400 --> 00:17.120
You will need a Google account as mentioned in the prerequisites lecture of the introduction section.

00:17.760 --> 00:20.080
The Resource Manager page will look like this.

00:21.160 --> 00:28.160
Click Create Project button at the top and give it a meaningful name to the project like YouTube API

00:28.200 --> 00:28.720
course.

00:31.880 --> 00:36.200
For organization, you can leave it as no organization and press create.

00:38.000 --> 00:39.960
Give it some time to create the project.

00:40.000 --> 00:41.960
You will see it loading over here.

00:44.240 --> 00:45.000
Refresh.

00:49.640 --> 00:51.960
And you will find the project here.

00:52.120 --> 00:57.360
Once you create a project, everything you do from here onwards, including creating the API key will

00:57.360 --> 00:59.040
apply to that specific project.

00:59.640 --> 01:04.450
If you have multiple projects going on at the same time, ensure that the correct one is selected.

01:04.610 --> 01:08.970
Now, to create the actual API key, go on the navigation menu on the left.

01:11.610 --> 01:15.650
Hover over API and services and click library.

01:17.490 --> 01:23.050
In the library, go down to the section under YouTube and press YouTube data API version three.

01:28.010 --> 01:28.730
Click enable.

01:31.770 --> 01:34.450
And from here press on the create button.

01:37.170 --> 01:39.170
So you can leave this as default.

01:39.210 --> 01:41.690
We're using the API version three.

01:42.450 --> 01:47.050
Click on the Public Data button as we will only be interested with public data.

01:48.170 --> 01:49.090
Click next.

01:50.970 --> 01:52.290
And here you have it.

01:52.290 --> 01:55.690
This is the API key which we will be using in this course.

01:56.490 --> 02:02.810
Now before we press done here you can see that there is this restrict key button.

02:02.810 --> 02:08.050
In a production environment you want to limit which your website's IP addresses or apps that can call

02:08.050 --> 02:09.570
the APIs with the key.

02:10.130 --> 02:14.410
For our use case, we will restrict it to just the YouTube API version three.

02:17.370 --> 02:26.290
So we can press Restrict key and we find YouTube API version three.

02:26.570 --> 02:28.250
Click okay and press save.

02:32.370 --> 02:33.970
We might need to redo this step again.

02:33.970 --> 02:37.370
Just click on public data and done.

02:41.530 --> 02:42.290
And that's it.

02:42.810 --> 02:48.650
Now if we go over to the credentials section under the APIs and services we should find the API key

02:48.690 --> 02:49.050
there.

02:51.770 --> 02:55.050
And there we have the API key which we'll be using.

02:55.850 --> 03:00.810
An important note before we close this off is that you should not share this key with anyone.

03:01.330 --> 03:04.330
And once you are done with the project, you should delete it.
