A simple Python script I cooked up as a solution to unreliable YouTube Upload notifications, both, from Youtube's own "Upload Notification Bell" and a few 3rd party solutions.
- Python 3
- Discord account an a server with an administration level permission
- Google Cloud Platform API Key with an enabled Youtube Data API V3
pip3 install google-api-python-client discord.py
- Go to https://console.cloud.google.com/ and create a project (Creating small projects with not too many requests / users is free)
- Once created, you should be redirected to the project's dashboard
- There, you need to first enable the use of the specific Youtube API:
- Go to Library
- Search for Youtube
- Click on the "YouTube Data API v3"
- Click Enable
- Second, return to the project's Dashboard and go to Credentials
- In the upper part of the screen, click "CREATE CREDENTIALS" - API key
- I recommend restricting the key to a specific IP address, so that even if the key leaked, it wouldn't be usable to anyone else
- Done, you have your API Key
- Open up settings of the server where you'll want to get your upload notifications
- Under "Integrations - Webhooks" click "New Webhook", fill in the webhook's name + channel where the webhook user will post into
- Copy Webhook URL
- Go to a target channel
- Click the Videos tab
- Click the "PLAY ALL" button next to "Uploads"
- The target ID will be the value of the "list" query parameter in the URL
- In Discord, go to User Settings
- Click the little three dots next to your Avatar / Name / Badges and click "Copy ID"