(After you have forked and cloned the repository)*
Just follow along ;)
-
Follow this link and click on CREATE PROJECT. Make sure you are logged in into your Google Developers Account.
-
Fill in the name you want to assign to your project.
-
On the top left corner, click the Google APIs link and then follow the link option dubbed “YouTube DATA API” below the YouTube API’s icon.
-
Now select the “ENABLE” button which manifests after you click the YouTube DATA API link.
-
Now click the button on the far right with the “Go to Credentials” phrase.
-
On the first select option displayed on this page, choose the YouTube Data API v3, and then the Web server (such as node js. Tomcat) on the second option. For the third option, choose public data. Lastly, click the button with “what credentials do I need”.
-
After hitting the “What credentials do I need” button, Google will create your new project, and you can now copy your API Key from this page.
Now you’re ready to use the YouTube API!
- Create a file named ".env".
- Create a variable named "API_KEY".
- Insert the key you generated in this variable.
API_KEY = 'Your API key here'
- Don't forget to save the file.
-
Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
-
On the Add credentials to your project page, click the Cancel button.
-
At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name if not already set, and click the Save button.
-
Select the Credentials tab, click the Create credentials button and select OAuth client ID.
-
Select the application type Web Application, enter the name "YouTube Data API Quickstart", and click the Create button.
-
Set Authorized Javascript origins URI as: "http://localhost:5000" and Redirect URI as: "http://localhost:5000/auth/oauth2/callback" then click Save button.
-
Click OK to dismiss the resulting dialog.
-
Click the file_download (Download JSON) button to the right of the client ID.
-
Open the downloaded file and add it to your .env file as
OAUTH_CLIENT_KEYS = contents_of_your_downloaded_json
If you are having doubts then check here too!
Boom! You did it ✌