What is an API?
An API, or application programming interface, is the bridge between two different pieces of software. It enables them to communicate with each other.
1. On your computer, go to console.developers.google.com. You should be logged in to your Google account.
2. Click CREATE PROJECT on the right-hand side of the screen. Wait for a few minutes while your project is prepared.
3. Add any Project name, and don’t change the Location. Click CREATE.
4. Now that you have created a project, you will be shown the dashboard for the project. Select Library from the left-hand tabs.
5. Scroll down to the YouTube section and select YouTube Data API v3. You can also use the search bar near the center of the page to find this API button.
6. Click the ENABLE button to enable the API. Wait for a few moments while Google carries out the process.
7. Click CREATE CREDENTIALS in the top-right corner of the page.
8. In the Select an API dropdown menu, select YouTube Data API v3. For the type of data you will be accessing, select Public data. Then click NEXT.
9. Your YouTube API key will load. Copy and paste it somewhere permanent but accessible, such as in any text-based file. Click DONE.
Now you are done creating your personal YouTube API key. The key is accessible under the Credentials tab. Next, we’ll create the API ID and API Secret that you’ll also need.
10. Select OAuth consent screen below the Credentials tab.
11. Select External and then click CREATE.
12. Enter any App name. You can use the same name as earlier. Click on the User support email drop-down box and click the email associated with the account.
13. Scroll down to Developer contact information at the bottom of the page. Input your email address again. Click SAVE AND CONTINUE.
14. Scroll to the bottom of the Scopes page shown next. Click SAVE AND CONTINUE.
15. Again, scroll to the bottom of the Test users page. Click SAVE AND CONTINUE.
16. On the Summary page, scroll to the bottom and click BACK TO DASHBOARD.
17. Select Credentials in the left-hand menu.
18. Click CREATE CREDENTIALS near the top of the screen. Select OAuth client ID from the drop-down menu.
19. On the next screen, click Application type and select TVs and Limited Input devices from the drop-down menu. The Name doesn’t matter, so leave the default. Click CREATE.
A pop-up window will appear showing your created YouTube Client ID and Secret. Copy and paste both of them in the same place as you saved your API key.