If you check the Videos insert method in the documentation. You will find that it states that it requires authorization

Authorization requires that you request permission of the user to access their data. In your case to insert into a users YouTube account you need their permission.
API keys on the other hand are only used to get read only access access public data. You cant access a private user account with it.
Answer from Linda Lawton - DaImTo on Stack OverflowGoogle
developers.google.com › youtube › data api › upload a video
Upload a Video | YouTube Data API | Google for Developers
September 14, 2026 - This guide provides and explains a Python script that uploads a YouTube video using the YouTube Data API. The code uses the Google APIs Client Library for Python.
PyPI
pypi.org › project › simple-youtube-api
simple-youtube-api
JavaScript is disabled in your browser. Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
Nono Martínez Alonso
nono.ma › upload-videos-to-youtube-data-api-python
Upload Videos to YouTube with the Data API in Python · Nono Martínez Alonso
October 18, 2022 - In the list of APIs, make sure the status is ON for the YouTube Data API v3. Go to the Credentials page and create one. ... Your project should now be showing in the dropdown next to Google Cloud Platform. Open the Credentials page again. ... conda create -n yt python=3.8 -y && conda activate yt pip install google-api-python-client pip install google_auth_oauthlib python -c "from apiclient.discovery import build;print(build)" As the upload_video.py sample is written in Python 2, there are minor edits that need to be done to upgrade to Python 3.
GitHub
github.com › davidrazmadzeExtra › YouTube_Python3_Upload_Video
GitHub - davidrazmadzeExtra/YouTube_Python3_Upload_Video: This guide provides and explains a Python script that uploads a YouTube video using the YouTube Data API. The code uses the Google APIs Client Library for Python. · GitHub
pip install --upgrade google-api-python-client pip install --upgrade google-auth-oauthlib google-auth-httplib2 pip install oauth2client · python3 upload_video.py --file="example.mov" --title="Summer vacation in California" --description="Had fun surfing in Santa Cruz" --keywords="surfing,Santa Cruz" --category="22" --privacyStatus="private" https://techpostplus.com/youtube-video-categories-list-faqs-and-solutions/
Author: davidrazmadzeExtra
Medium
medium.com › @nijmehar16 › uploading-videos-to-youtube-via-the-youtube-api-programmatically-which-uses-oauth-2-0-7317ec72411e
Uploading videos to youtube via the Youtube api programmatically using the refresh token provided by OAuth 2.0 | by Nijmehar | Medium
November 11, 2023 - # For more information about using OAuth2 to access the YouTube Data API, see: # https://developers.google.com/youtube/v3/guides/authentication # For more information about the client_secrets.json file format, see: # https://developers.google.com/api-client-library/python/guide/aaa_client_secrets CLIENT_SECRETS_FILE = "client_secrets.json" # This OAuth 2.0 access scope allows an application to upload files to the # authenticated user's YouTube channel, but doesn't allow other types of access.
Learn Data Analysis
learndataanalysis.org › home › how to upload a video to youtube using youtube data api in python
How to upload a video to YouTube using YouTube Data API in Python - Learn Data Analysis
January 18, 2022 - import datetime from Google import Create_Service from googleapiclient.http import MediaFileUpload CLIENT_SECRET_FILE = '<client file.json>' API_NAME = 'youtube' API_VERSION = 'v3' SCOPES = ['https://www.googleapis.com/auth/youtube.upload'] service = Create_Service(CLIENT_SECRET_FILE, API_NAME, API_VERSION, SCOPES) upload_date_time = datetime.datetime(2020, 12, 25, 12, 30, 0).isoformat() + '.000Z' request_body = { 'snippet': { 'categoryI': 19, 'title': 'Upload Testing', 'description': 'Hello World Description', 'tags': ['Travel', 'video test', 'Travel Tips'] }, 'status': { 'privacyStatus': 'pr
YouTube
youtube.com › watch
How to Upload Videos to YouTube Using Python (YouTube API v3 Tutorial) - YouTube
Want to automate your YouTube uploads using Python? In this video, I’ll show you step-by-step how to upload a video to YouTube using the YouTube Data API v3!...
Published: June 13, 2025
Toolify
toolify.ai › ai-news › learn-to-upload-videos-using-youtube-data-api-with-python-105182
Learn to Upload Videos using YouTube Data API with Python
December 26, 2023 - We covered the installation of necessary packages, creating a project on the Google Cloud Platform, enabling the YouTube Data API, configuring consent screen, creating credentials, obtaining client secrets JSON, updating the Python script, uploading videos to YouTube, and troubleshooting and verifying the application.
YouTube
youtube.com › watch
How to Upload Videos with the YouTube API (using Python) - YouTube
Learn how to upload a new video with the YouTube API and Python. This tutorial uses YouTube Data API v3.Check out videoflo on GitHub (and follow me there too...
Published: July 13, 2021