[dropcap]W[/dropcap]hen calling an API that does not access private user data, you can use a simple API key. This key is used to authenticate your application for accounting purposes. The Google APIs Console documentation also describes API keys.
Following are the steps to generate YouTube Data API & URL Shortener API with image examples:
First you need to Go to https://console.developers.google.com and then follow the images given in below steps to generate YouTube Data API & URL Shortener API
We would be creating new project for the application.
For eg. i would be creating the Project named Demo Project
As shown in red circle below click on Create Project, you would be redirected to project page as shown in Step 2.
Provide the name for your project (for demo i am creating project with name Demo Project)
After creating project you would be redirected to below page where you would be creating the API key.
After clicking the “API Enable & mange API” in above step you would be redirected to below page, here clik on credentials to proceed with creating the API key.
Here click on API Key as we are focused on creating the API key.
Here we are concered with creating the Browser key which will allow to access the API data from any browser as well as code.
Here we provide the name for the key which by default is Browser key 1 (you can change it if needed)
Here is your API key
Now you got your key, you need to enable the key for various services.
For enabling the services please go to Overview tab.
In this step we would be enabling the Youtueb Data API
After clicking on the Youtube Data API you woudl be redirected to the below page, where just click Enable API for enabling it.
After enabling the API you would be redirected to the below page.
For enabling the URL Shortner API, please click on URL Shortner API on Overview page and you will be redirected to below page.
Just enable the API by clicking Enable API
After enabling the API you would be redirected to below page.
Your API is ready to use, But dont forget to make a note of your API key 😉