The first step to get a YouTube API key is to log in to the Google Developer Console.
The link to the console is in the appendix of the section.
You will need a Google account as mentioned in the prerequisites lecture of the introduction section.
The Resource Manager page will look like this.
Click Create Project button at the top and give it a meaningful name to the project like YouTube API
course.
For organization, you can leave it as no organization and press create.
Give it some time to create the project.
You will see it loading over here.
Refresh.
And you will find the project here.
Once you create a project, everything you do from here onwards, including creating the API key will
apply to that specific project.
If you have multiple projects going on at the same time, ensure that the correct one is selected.
Now, to create the actual API key, go on the navigation menu on the left.
Hover over API and services and click library.
In the library, go down to the section under YouTube and press YouTube data API version three.
Click enable.
And from here press on the create button.
So you can leave this as default.
We're using the API version three.
Click on the Public Data button as we will only be interested with public data.
Click next.
And here you have it.
This is the API key which we will be using in this course.
Now before we press done here you can see that there is this restrict key button.
In a production environment you want to limit which your website's IP addresses or apps that can call
the APIs with the key.
For our use case, we will restrict it to just the YouTube API version three.
So we can press Restrict key and we find YouTube API version three.
Click okay and press save.
We might need to redo this step again.
Just click on public data and done.
And that's it.
Now if we go over to the credentials section under the APIs and services we should find the API key
there.
And there we have the API key which we'll be using.
An important note before we close this off is that you should not share this key with anyone.
And once you are done with the project, you should delete it.