-
Notifications
You must be signed in to change notification settings - Fork 389
Instructions: Obtaining an API Key
ThioJoe edited this page Jan 22, 2022
·
2 revisions
To use the program, you will need an "Oauth2" credential to access the scanning and deletion functions via YouTube's Data API. Otherwise this script won't work at all.
-
Video Walkthrough Here: https://www.youtube.com/watch?v=c6ebWvay8dE
1. Log into Google Developer's Console with your Google account that has your YouTube channel.
2. On the top blue bar nex to where it says "Google Cloud Platform", click the dropdown to 'Select a Project'. (If you have existing projects, it may instead show the name of one)
5. Make sure the project you just created is active, with it showing at the top, then click "Library" on the left menu.
(Note: If you don't see this page, open the left pop-out menu and click "APIs & Services" > "Dashboard". Then in the table/list on the page, look in the 'Name' column, and click "YouTube Data API v3")
10. Under "Oauth Consent Screen", fill out the required fields with some name, select your email, and enter an email below too. It doesn't really matter what you put here. Then click "Save and Continue"
11. Click "Add or Remove Scopes", then find the one that says ".../auth/youtube.force-ssl", click the check box, then at the bottom click "Update". Then click "Save and Continue"
12. Under "Oauth Client ID", just select 'Desktop App'. You can set a name or not. Then click "create".
13. Now click "Download" to download the credentials json file. Rename it to client_secrets.json
and save it into the same directory as the python script. Then click done.
14. When trying to log in you may get a "403 Access_Denied" error. If so, you need to add yourself as an authorized user. On the left menu, go to APIs & Services > Oauth Consent Screen > Under Test Users, Click "Add Users". On the pop out window, type in your same Google/channel account email into the box and hit Save.
Note: If something on this page seems out of date or there is information missing, feel free to submit an issue.