Closed pavzagor closed 2 years ago
Run the main script again, copy the URL in the output and paste it directly in the browser. You will be prompted to sign in to get the verification key.
The renaming helped (had to rename via mv not the gui)
now it says «Using client secrets: /Users/pavelzagorodnikh/.client_secrets.json Using credentials file: /Users/pavelzagorodnikh/.youtube-upload-credentials.json»
Nothing happens after that/
Everything is working now
Thanks a lot! God I love the developers community
Describe the bug [FlowExchangeError] invalid_clientThe OAuth client was not found.
To Reproduce Steps to reproduce the behavior:
Install dependencies (sudo pip install --upgrade google-api-python-client oauth2client progressbar2) ↓
Requirement already satisfied: google-api-python-client in /usr/local/lib/python3.9/site-packages (2.8.0) Requirement already satisfied: oauth2client in /usr/local/lib/python3.9/site-packages (4.1.3) Requirement already satisfied: progressbar2 in /usr/local/lib/python3.9/site-packages (3.53.1) Requirement already satisfied: six<2dev,>=1.13.0 in /usr/local/lib/python3.9/site-packages (from google-api-python-client) (1.16.0) Requirement already satisfied: uritemplate<4dev,>=3.0.0 in /usr/local/lib/python3.9/site-packages (from google-api-python-client) (3.0.1) Requirement already satisfied: google-api-core<2dev,>=1.21.0 in /usr/local/lib/python3.9/site-packages (from google-api-python-client) (1.30.0) Requirement already satisfied: google-auth-httplib2>=0.1.0 in /usr/local/lib/python3.9/site-packages (from google-api-python-client) (0.1.0) Requirement already satisfied: google-auth<2dev,>=1.16.0 in /usr/local/lib/python3.9/site-packages (from google-api-python-client) (1.30.2) Requirement already satisfied: httplib2<1dev,>=0.15.0 in /usr/local/lib/python3.9/site-packages (from google-api-python-client) (0.19.1) Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /usr/local/lib/python3.9/site-packages (from google-api-core<2dev,>=1.21.0->google-api-python-client) (2.25.1) Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /usr/local/lib/python3.9/site-packages (from google-api-core<2dev,>=1.21.0->google-api-python-client) (1.53.0) Requirement already satisfied: setuptools>=40.3.0 in /usr/local/lib/python3.9/site-packages (from google-api-core<2dev,>=1.21.0->google-api-python-client) (56.0.0) Requirement already satisfied: pytz in /usr/local/lib/python3.9/site-packages (from google-api-core<2dev,>=1.21.0->google-api-python-client) (2021.1) Requirement already satisfied: packaging>=14.3 in /usr/local/lib/python3.9/site-packages (from google-api-core<2dev,>=1.21.0->google-api-python-client) (20.9) Requirement already satisfied: protobuf>=3.12.0 in /usr/local/lib/python3.9/site-packages (from google-api-core<2dev,>=1.21.0->google-api-python-client) (3.17.3) Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.9/site-packages (from google-auth<2dev,>=1.16.0->google-api-python-client) (4.2.2) Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.9/site-packages (from google-auth<2dev,>=1.16.0->google-api-python-client) (0.2.8) Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.9/site-packages (from google-auth<2dev,>=1.16.0->google-api-python-client) (4.7.2) Requirement already satisfied: pyparsing<3,>=2.4.2 in /usr/local/lib/python3.9/site-packages (from httplib2<1dev,>=0.15.0->google-api-python-client) (2.4.7) Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.9/site-packages (from pyasn1-modules>=0.2.1->google-auth<2dev,>=1.16.0->google-api-python-client) (0.4.8) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2dev,>=1.21.0->google-api-python-client) (1.26.5) Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.9/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2dev,>=1.21.0->google-api-python-client) (4.0.0) Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2dev,>=1.21.0->google-api-python-client) (2.10) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core<2dev,>=1.21.0->google-api-python-client) (2021.5.30) Requirement already satisfied: python-utils>=2.3.0 in /usr/local/lib/python3.9/site-packages (from progressbar2) (2.5.6)
Clone repo (git clone https://github.com/tokland/youtube-upload.git)
Go into the cloned repo folder (cd youtube-upload)
run the setup file (sudo python setup.py install)
Creare credentials( https://console.cloud.google.com/apis/credentials
Go to the folder w videos (cd Documents/Zoom/)
launch youtube upload (youtube-upload --title "test" video.mp4)
Using client secrets: /Users/pavelzagorodnikh/.client_secrets.json Using credentials file: /Users/pavelzagorodnikh/.youtube-upload-credentials.json /usr/local/lib/python3.9/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /Users/pavelzagorodnikh/.youtube-upload-credentials.json: No such file or directory warnings.warn(_MISSING_FILE_MESSAGE.format(filename)) Check this link in your browser: https://accounts.google.com/o/oauth2/auth?client_id=YOUR+CLIENT+ID&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.upload+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube&access_type=offline&response_type=code
Copy the unaltered link to the address bar and hit return (https://accounts.google.com/o/oauth2/auth?client_id=YOUR+CLIENT+ID&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.upload+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube&access_type=offline&response_type=code)
Copy the same link but replace YOUR+CLIENT+ID with client ID from client_secrets.json → visit
Choose the account to which the credentials were issued
Choose the channel
Grant permissions
Copy sign-in code and paste to the terminal → hit enter
Get FlowExchangeError
[FlowExchangeError] invalid_clientThe OAuth client was not found.
Expected behavior Successful authorization. The script is now able to upload videos.
Desktop (please complete the following information):
Additional context About window screenshot
authentication error can't authenticate 401 error