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 Overflow
🌐
Google
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.
🌐
GitHub
github.com › pillargg › youtube-upload
GitHub - pillargg/youtube-upload: Upload Youtube Videos and more via Python · GitHub
Upload Youtube Videos and more via Python. ... You can read more below and on the docs. This project uses the Youtube Data API.
🌐
Omi AI
omi.me › blogs › api-guides › how-to-use-youtube-data-api-to-upload-videos-in-python
How to Use YouTube Data API to Upload Videos in Python – Omi AI
November 5, 2024 - Start by downloading the OAuth 2.0 client credentials file from the Google API Console. Load the credentials in Python using the `google-auth` library. import os import google_auth_oauthlib.flow from google_auth_oauthlib.flow import InstalledAppFlow ...
🌐
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
🌐
GitHub
github.com › tokland › youtube-upload
GitHub - tokland/youtube-upload: Upload videos to Youtube from the command line · GitHub
Command-line script to upload videos to Youtube using theYoutube APIv3. It should work on any platform (GNU/Linux, BSD, OS X, Windows, ...) that runs Python.
🌐
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 › youtube › api-samples › blob › master › python › upload_video.py
api-samples/python/upload_video.py at master · youtube/api-samples
Code samples for YouTube APIs, including the YouTube Data API, YouTube Analytics API, and YouTube Live Streaming API. The repo contains language-specific directories that contain the samples. - api-samples/python/upload_video.py at master · youtube/api-samples
Author: youtube
Find elsewhere
🌐
Phyllo
getphyllo.com › home › blog › how to use youtube api to upload videos
How To Use YouTube API To Upload Videos | Phyllo
Upload videos with the YouTube API using videos.insert: OAuth 2.0 setup, a resumable Python upload, retry handling, and the 1,600 unit quota cost per upload.
🌐
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 › @rfugaru92 › upload-video-to-youtube-using-data-api-and-python-48e6667b2817
Upload Video to YouTube using Data API and Python | by Radu Costin | Medium
January 11, 2023 - Then, we will use the Google API Python Client library to interact with the YouTube API and upload a video to a specific channel.
🌐
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
🌐
Apify
apify.com › dami_studio › youtube-video-uploader › api › python
YouTube Video Uploader - Upload & Schedule, No Code API in Python · Apify
June 10, 2026 - The Apify API client for Python is the official library that allows you to use YouTube Video Uploader - Auto-Publish From Any URL API in Python, providing convenience functions and automatic retries on errors.
Rating: 5 ​ - ​ 1 votes
🌐
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
🌐
Postproxy
postproxy.dev › home › blog › youtube upload api: videos & shorts (2026)
YouTube Upload API: Videos & Shorts (2026) | Postproxy
March 12, 2026 - Upload videos and Shorts to YouTube via API: OAuth setup, resumable uploads, quota limits, and code examples in Python and Node.js.
🌐
DEV Community
dev.to › viniciusenari › automating-content-creation-with-python-a-guide-to-building-a-twitch-highlights-bot-part-4-26jn
Automating Content Creation with Python: Uploading a Video to Youtube - DEV Community
January 29, 2023 - You need to download the Python libraries to authenticate with Google, set up a project on Google Cloud and then you will be able to download the API credentials as JSON file. Google provides code snippets for many actions that you may want ...