As is tradition, the process consists of 3 easy steps:
- Creating a new project in your Google Cloud Platform account.
- Enabling the “YouTube Data API V3″ data source for your newly created project.
- Generating the API key to access the YouTube API.
Log into your Google Cloud Platform account. Create your new project or select an existing one.
Once your new project is available, search “YouTube Data API V3” and enable the data source. You can also create the project here if you’re a rebel and skipped step 1.
The end goal is to enable the YouTube data source for your project, which you did. Half-way there.
Generate and save your API keys as illustrated below. But first, locate the YouTube DATA API.
Here you can choose to restrict the API key to your own domain. If unsure about this, leave the default options until you get the website operational. Otherwise, make sure to use the correct details about your domain and the rules you set. This part can’t be ignored and is the #1 source for problems.
When set incorrectly, there can be no communication between your domain and the YouTube API since the restrictions/rules prevent it. Don’t worry, you’ll get an error message about it.
Job done 🥳
Just copy/pasta your shiny new API key in PHP Melody’s ‘Settings’ page (you know where) and you’re good to go.
Have fun and be mindful of API usage and Google’s terms of service.