Questions tagged [google-api-python-client]

The Google APIs Client Library for Python provides access to for Google's discovery based APIs. It is designed for Python client-application developers and offers simple, flexible, powerful API access.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Cloud Identity API v1beta1 BUG - unexpected argument must be provided

I'm trying to use orgUnits.memberships.move method to move a Shared Drive from 1 orgUnit to another. https://cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships/move The issue ...
0 votes
0 answers
6 views

ImportError: cannot import name 'MutualTLSChannelError' from 'google.auth.exceptions'

Trying to import the Earth Engine Library import ee # Initialize the Earth Engine library ee.Authenticate() ee.Initialize() On the very first line I am getting an Import Error. ImportError ...
  • 121
0 votes
1 answer
23 views

I can't install pygsheets

When I tried to execute script, I got following error: Could not find a version that satisfies the requirement google-api-python-client>=2.50.0 (from pygsheets==2.0.6) (from versions: 1....
3 votes
1 answer
41 views

Where to find proper documentation of Google Drive API Python client library

I want to use Google's Python client libraries to access the Google Drive API (v3). There is a quickstart document that shows the basic usage of some of Google's Python packages, but I cannot find a ...
  • 3,226
0 votes
0 answers
66 views

Delete text from a Google slides using API

I' m trying to repetetive presentation with Google Slides starting from the events on Google Calendar using an API. I was able to replace some text, but I'd like to delete all the text after the last ...
0 votes
0 answers
9 views

How to find out which Google API Python package defines NoUserIdException

I know that an error named NoUserIdException is defined somewhere in the sheer endless number of Google API Python packages, but I can't seem to find out where, so I can't import it. Is there a ...
  • 3,226
0 votes
0 answers
14 views

Google Cloud, Photos API continuously returning error code 500 (internal server error)

I am making a discord bot, which can automatically send attachments (images) in messages to a google photos drive. The following snippet (part of bigger code): create_body = {"albumId": self....
0 votes
1 answer
34 views

Google OAuth2.0 - Unintended redirecting to http

I'm trying to setup a Google OAuth for my FARM stack app. My problem is: My flow and code is working when I'm running the app in my local. But It's not working in production. (Because Google doesn't ...
2 votes
1 answer
57 views

YouTube API videos.rate method only rates some videos

Code summary: Script that uses YouTube API and implements OAuth 2.0 to get access to one account, retrieve its liked videos, and get access to another account and use that list of liked videos to like ...
  • 39
0 votes
1 answer
46 views

Is there any Python API to fetch the list of all the active resources(VM's, Buckets, Datasets, etc) and their metadata for a project in GCP?

I'm looking for a Python API to fetch instances, buckets, datasets, data proc, and other resource metadata for my project in GCP. I looked into cloud monitoring API, but it only gives resource ...
0 votes
1 answer
13 views

Is there a way to provide bigquery data to external clients, filtering only their respective data?

Scenario: Imagine that i have multiple clients data on bigquery and need to provide a way to they have access to their data, only their data. How can i provide this access with less effort? i was ...
  • 380
0 votes
0 answers
5 views

Google Directory API Add Large Number of Members Optimisation

I have a scenario where i am creating a backend on aws lambda to add/update/delete members in a group. Number of members at times could be more than 1000 as well. I know we can use batch request to ...
2 votes
1 answer
55 views

Google Admin SDK API Error: creation is disallowed as we've detected some potentially abusive behavior

I want to perform a load test of a python script which creates/deletes users in the GoogleWorkspace. However, I faced the following Error. googleapiclient.errors.HttpError: <HttpError 412 when ...
0 votes
0 answers
15 views

Obtaining a refresh token from gapi auth2

I have the following use case: I have a Django REST + Vuejs application in which users log in using Google OAuth 2. Once they've logged in, there are some actions that they might perform which require ...
0 votes
0 answers
39 views

Django server Google Id_token verification using google.oauth2.id_token.verify_oauth2_token() not working

I'm trying to build a flutter app with django backend and need to implement google authentication as well. After receiving the Id_token from google, I send it to my django server. Whilst trying to ...
0 votes
0 answers
27 views

Upload Conversion Value Rules (Google Ads API) via python sdk / script?

The (relatively) new Google Ads API offers Conversion Value Rules - but I am looking for some examples, resources, pointers ... of uploading them via the python client library. I would like to create ...
  • 541
4 votes
2 answers
763 views

【Google OAuth】AttributeError: 'InstalledAppFlow' object has no attribute 'run_console'

I wrote a Python script(Google_add.py) which creates users in the Google Workspace. However, When it is run, an AttributeError occurred. How do I resolve this Error? ・Google_add.py (Excerpt) PATH = '/...
4 votes
1 answer
114 views

I am getting Access blocked error while trying to get athentication code which i will use to get refresh token?

here is what is tried I changed the status of O Auth Consent screen from testing to publish and the app scope is external then i created the O Auth client Id token and then i tried this code but this ...
0 votes
0 answers
49 views

Not able to transfrer data from csv to sheets

files = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g'} COLUMNS = ['cs_mallId', 'counts'] responseDf = pd.read_csv('/path/to/the/csv', usecols=COLUMNS) tokenPath='path/to/.token.json' ...
5 votes
2 answers
139 views

Authenticate a GET request to Google Play Purchase API with service account python

I need to verify purchases of my android App from my AWS lambda in python. I have seen many posts of how to do so and the documentation and here is the code I have written : url = f"{...
  • 2,307
0 votes
0 answers
32 views

YouTube Data API: video.list endpoint returning 400 error invalid filters

I am using YouTube Data Api v3 to fetch video statistics from a YouTube channel. But I am getting the error message below. I searched online, but couldn't figure out the error because I am not using ...
  • 2,509
0 votes
1 answer
56 views

How to detect the user on google calendar events push notification callback?

I am trying to sync a booking system with google calendar and google resource as two-way synchronization. To do that, I creates webhook channels on specific google resource calendars to be aware of ...
0 votes
0 answers
50 views

Adding multiple videos to youtube-playlist in single api request (Python)

So I have this script that extracts users liked videos and creates a public playlist containing all liked videos but since there's quota limits I can't add more than 200 videos per day (playlistItems()...
  • 1
0 votes
1 answer
86 views

How to download files from GCS cloud bucket which has special characters in their file names using python client api?

I am using Windows and I am able to download GCS files which don't have special characters. I used the following link to download the files. However, I am unable to download files which have special ...
  • 406
1 vote
0 answers
23 views

Is there any way to run a python script using the google API / Oauth function without needing to authenticate the account every time the script runs?

Here is a quickpython script that I wrote to upload a file to Google Drive: from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() drive = ...
0 votes
0 answers
29 views

Google Ads API not returning the segments.date and returning a SearchPager instead

I just started working with the Google Ads API and am interested in getting various data points (clicks, impressions, etc.) with specific information for each date, for example: {'2023-02-01': {'...
  • 36
0 votes
0 answers
23 views

Error when trying to install googleapiclient in my Python Project

I use this import to import the googleapiclient in my Python project... import googleapiclient.discovery when I try to install the package, I get this error ERROR: Could not find a version that ...
0 votes
1 answer
32 views

Parsing Requests Module Response JSON

I am trying to use the [OpenMeteo API][1] to download CSVs via script. Using their API Builder, and their click-able site, I am able to do it for a single site just fine. In trying to write a function ...
  • 1,107
0 votes
0 answers
40 views

Quarto notebook stuck at google client auth

I am using a quarto notebook to interact with google drive using python. I instantiate the google client using the following code import gspread import gspread_pandas as gsp from googleapiclient ...
  • 432
0 votes
1 answer
28 views

How to send a http patch method for a Google Cloud Deployment Manager resource using a python template

I'm creating a HA VPN using Google Cloud Deployment Manager using the following guide: https://cloud.google.com/network-connectivity/docs/vpn/how-to/creating-ha-vpn#api_4 As part of the guide there is ...
1 vote
0 answers
18 views

Is there a way to get results from City Dimension in English when using the Youtube Analytics API?

I'm trying to automate the collection of Youtube channel statistics information using the Youtube Analytics API. I was able to gather most of the stats I needed, but the stats for City Dimension are ...
1 vote
2 answers
73 views

How to create google resource calendar using any API?

I'm looking for a way to create resource calendars for shared rooms and for booking using any google API. In google documentation, it is mentioned that: The Calendar API does not offer a way to ...
0 votes
1 answer
71 views

googleapiclient.errors.UnknownApiNameOrVersion in python file

I want to upload a video on YouTube that is not working. I do not know why my code: import google.auth from googleapiclient.discovery import build from googleapiclient.errors import HttpError def ...
  • 19
0 votes
0 answers
84 views

Trouble getting python Google Calendar API to work with service account

I have built this e-ink google calendar project which adapts the Google python quickstart code. I have OAuth working with a private account, but have found that the token expires every 7 days. I ...
1 vote
0 answers
65 views

Google Earth Engine Python API Warning

Yesterday, I created a script to get Sentinel-1 images for a specific region and the code ran as expected. Today, running the same code with no changes I get the following warning: WARNING:...
  • 31
2 votes
1 answer
169 views

I can't properly authorize my Python web app to access Google API

I'm using google api to integrate some google sheet data into my app. I have a server where I can only connect via SSH, as it has no user interface. When I start my app, it gives me this message: ...
  • 281
0 votes
1 answer
65 views

non-ASCII characters are interpreted as bytes when written to a .csv file

When there is a youtube title that has non-ASCII characters ( in my case its greek letters). This is what is being shown on the .csv file after I ran the program.If I hadnt used utf-8 it doesnt write ...
1 vote
2 answers
45 views

Search for files with ' in them with the Google Drive Python API

I'm using this code to find a file in My Drive with the Google Drive Python API: results = service.files().list(q="name='"+finalfile+"'" fields="files(id)").execute()` ...
0 votes
1 answer
60 views

SpreadsheetNotFound Error for Python when trying to write to Google Sheet

OS: Windows 11 Python 3.11, using VS Code So, I want to use a python script to autofill a bunch of cells in a google spreadsheet, and I was using the guide at https://www.makeuseof.com/tag/read-write-...
2 votes
1 answer
61 views

How to access accountUserLinks in the Google Analtyics managment api with python?

I'm looking for the library for this method analytics.management().accountUserLinks().insert everytime I try to run it the error is always the same, the method management() doesn't exists into the ...
0 votes
0 answers
69 views

I need to insert data in table SQLite Django

I am new to Django. I think it's really easy one for Django expert, so I wish I could get help from you. I have two tables in SQLite DB-namely Process and ScrapedData. While migrating models I have ...
0 votes
0 answers
96 views

Unable to send email python: ValueError: Authorized user info was not in the expected format, missing fields client_secret, client_id, refresh_token

I want to send email from my python code to gmail using oAuth2. For that I have created the project using google api and generated the secrets token. I am not sure how to use that in my code. Any help ...
1 vote
0 answers
36 views

OAuthlib thinks request is insecure because of reverse proxy

I have noticed that for every request, request.scheme is http. I can't find any official source why, but I have been told by my peers this is because of Cloudflare acting as reverse proxy and a tls ...
  • 33
1 vote
1 answer
224 views

Google Oauth2 - redirect_uri_mismatch 400

Hello i am trying to integrate Google Sign In into my python script and i am running this this error: Access blocked: This app’s request is invalid You can’t sign in because this app sent an invalid ...
  • 15
0 votes
0 answers
58 views

Python: Getting the text of email body using Gmail API

I am trying to extract body of the email from my gmail accounts based off their email ids. I am able to acquire the body, however I am not able to generalize the approach and have to resort to ...
1 vote
1 answer
59 views

Google drive api keeps requesting authentication whenever my script is run

I am trying to create a script that uploads pictures to my google drive folder. This script works well on my computer, but the problem is that this script is supposed to run itself every other week ...
0 votes
0 answers
52 views

Can't access the static_discovery=False parameter in the python Google drive api when creating services

I have a script reading sheets, docs and folders from a google drive. It works without any problem. However when trying to bulid an exe with py installer I have the "module 'google.oauth2....
0 votes
0 answers
117 views

In Google Sign in for Web, can I pas other POST parameters to data-login_uri?

Currently migrating from Google Sign-In for Web (deprecated) to Sign In with Google for Web https://developers.google.com/identity/gsi/web/guides/overview In the original library I could make the POST ...
  • 1,200
1 vote
1 answer
146 views

Timeout when deploying large model to Vertex AI endpoint

I'm trying to deploy my model to my Vertex AI endpoint, but I get this timeout: endpoint._deploy_call( File "C:\Users\anna\AppData\Local\pypoetry\Cache\virtualenvs\tagscenarios-pliF7DGk-py3.10\...
0 votes
1 answer
124 views

Failed to refresh Access Token when using Google OAuth2.0 credentials

I am trying to use GA4 API (with Google Python Client & Google Analytics Data Python Client) of Google with the Credentials authentication: credentials = Credentials( token=...
  • 1,467

1
2 3 4 5
30