google-api-python-client

Google OAuth error 400: redirect_uri_mismatch in Python

Google OAuth error 400: redirect_uri_mismatch in Python Question: first time using OAuth here and I am stuck. I am building a web app that needs to make authorized calls to the YouTube Data API. I am testing the OAuth flow from my local computer. I am stuck receiving Error 400: redirect_uri_mismatch when I try to …

Total answers: 4

I can't authorize gmail api application in google colaboratory

I can't authorize gmail api application in google colaboratory Question: I’m running the quickstart code from https://developers.google.com/people/quickstart/python in a colab notebook. # [START people_quickstart] from __future__ import print_function import os.path from google.auth.transport.requests import Request from google.oauth2.credentials import Credentials from google_auth_oauthlib.flow import InstalledAppFlow from googleapiclient.discovery import build from googleapiclient.errors import HttpError # If modifying these scopes, …

Total answers: 2

GMAIL API: I cant change account in python

GMAIL API: I cant change account in python Question: I want to change the account in python, but when I change flow=InstalledAppFlow.from_client_secrets_file(‘onerandomclient.json’, SCOPES) For the other JSON, still connecting with the last account, not the one I put. Asked By: GundamUser || Source Answers: I am going to assume that you are following python quickstart …

Total answers: 1

In python, is there any way I can store a 'Resource' object so I can use it later?

In python, is there any way I can store a 'Resource' object so I can use it later? Question: I am writing a program about the YouTube API flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(client_secrets_file, scopes) credentials = flow.run_console() youtube_analytics = googleapiclient.discovery.build("youtubeAnalytics", "v2", credentials=credentials) Finally it will return a ‘Resource’ object, can I store this object? So that I …

Total answers: 2

Getting UnicodeDecodeError when converting a InMemoryUploadedFile to Google MediaUpload

Getting UnicodeDecodeError when converting a InMemoryUploadedFile to Google MediaUpload Question: I am looking for your assistance with the following situation: I am building a Django Application and I am orchestrating the instance on Google App Engine, Once your Google App Engine instance it’s running it will enter into a "readonly" mode, and therefore Django can …

Total answers: 1

Import "google_auth_oauthlib.flow" could not be resolved

Import "google_auth_oauthlib.flow" could not be resolved Question: In VSCODE using these specifications: pip 21.3.1 from C:userscomputadorappdatalocalprogramspythonpython39libsite-packagespip (python 3.9) I’m using this path for installation: pip install –upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib But when I try to add the flow import, it keeps saying could not be resolved, several videos use this model to work and none …

Total answers: 2

Python Code to Retrieve Records of Exact Phrase/String for a Google Search Query

Python Code to Retrieve Records of Exact Phrase/String for a Google Search Query Question: There’s a similar question but it is not answered. I am trying to retrieve a list of URL links for the EXACT phrase/string in a Google search query with python code. I do not want search results or URL links of …

Total answers: 1

KeyError: “likeCount" and IndexError: list index out of range in Python

KeyError: “likeCount" and IndexError: list index out of range in Python Question: I am using Python jupyter notebook to get stats like total likes count, dislikes count, total views for all the videos (~14k videos) for some particular you tube channel. I have used this code which I found in Gitbub. I was able to …

Total answers: 1