YouTube API Key is a key that your website needs to communicate with YouTube. It is free to get, so you just need to follow these steps to obtain it, if you don’t already have one.
First, log into https://console.cloud.google.com/apis/dashboard with your gmail account and click on Create Project in the top-right corner.
Then, choose any project name (e.g. YT2Posts) and click Create.
Click on the Enable API and Services.
In the search tab, type “youtube data api v3” and click Enter.
Click on Youtube Data API v3 from the search results.
Now that the api has been enabled, a new page will open. Click on Create Credentials.