1,677 questions
1
vote
0
answers
138
views
Google Docs API - 403 - googleapiclient.errors.HttpError: 403
Problem:
I am facing this error-
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://docs.googleapis.com/v1/documents?alt=json returned "The caller does not have ...
14
votes
2
answers
31k
views
Encountering 503 Error When Calling Gemini API from Google Colab
I'm working on a project using Google Colab to run Python code that interacts with the Gemini API (a part of Google's Cloud AI tools). The goal is to automate call transcript categorization into ...
0
votes
1
answer
54
views
403 Forbidden Error when updating caption track via captions.update
I’m using the Python client library (google-api-python-client) to call captions.update, but I keep getting a 403 forbidden even though I’ve granted all the obvious scopes. I’d appreciate any insight ...
0
votes
2
answers
157
views
Correct way to use GKE Connect Gateway client?
I'm trying to use the Connect Gateway client in python to connect to GKE but I keep getting 400, even if everything seemingly is correct.
Example
from google.cloud.gkeconnect import gateway_v1
client ...
0
votes
2
answers
88
views
Can't create a monthly recurring google calendar event with python
I am using a python script to import calendar entries from one tool to google calendar. I have no problems with events that repeat weekly, but the monthly repeating events get created incorrectly.
I ...
0
votes
0
answers
115
views
Google OAuth2 Refresh Token Expires Quickly Despite “offline” Access (Unverified Published App)
Problem:
Even after requesting “offline” access and saving the refresh token, the refresh token stops working after 1 day or sometimes just a few hours.
Actual error: Reauthentication is needed. ...
3
votes
1
answer
6k
views
Parse Table data from a public google doc using Python
I have a URL to a public google doc which is published (It says published using Google Docs at the top). It has a URL in the form of
https://docs.google.com/document/d/e/<Some long random string, I ...
6
votes
7
answers
10k
views
Google generative api with palm: 403 Request had insufficient authentication scopes. [reason: "ACCESS_TOKEN_SCOPE_INSUFFICIENT"
I have been trying to use the Palm API and the palm.chat() function with google's new generative api. I've been in a maze of documentation and errors and I can't seem to get past this one. My code is ...
0
votes
2
answers
133
views
Listing Google Drive files returning empty list (Python)
I am testing my python connection to Google Drive using Python Google API Client. I am able to establish a connection, but I am not getting back a list of objects from Google Drive. I wonder if a lack ...
1
vote
1
answer
112
views
Google Sheets API - Create empty sheet - Slow performance
Using the Python example taken directly from the "Google Sheets API documentation > Create a spreadsheet" and changing only the credentials, I am experiencing poor performance. It's ...
0
votes
1
answer
656
views
Access data on my google drive using service account [duplicate]
I can't read the files that I saved on "Google Drive" using the code that You can see below.
I've yet enabled the "Google Drive API" in the GCP project.
I've yet created the "...
2
votes
1
answer
2k
views
Google calendar API - Appointment schedule
In Google calendar you can add "Appointment schedule"
These are events that repeat periodically. But they are not created from ordinary events. They are created precisely by the schedule.
...
2
votes
1
answer
193
views
Google DV360 Reporting - Error while fetching performance metrics
I am trying to extract and download reports from DV360 API using python. I have gone through the documentation https://developers.google.com/bid-manager/guides/get-started/send-request ,but not able ...
1
vote
1
answer
113
views
Getting Google site reviews with Python
I need to be able to get Google site reviews by their API do put them in our data warehouse.
I tried with the following code:
from googleapiclient.discovery import build
API_KEY = '...
0
votes
0
answers
49
views
Google API for Monetization Issue when accessing Youtube Revenue data for channel
I have the ClientId and SecretKey json file and trying to get the estimatedRevenue for the youtube channel.
I have this scope defined
SCOPES = ["https://www.googleapis.com/auth/yt-analytics-...
3
votes
3
answers
3k
views
Sending a reply with Gmail API Python
I created two Gmail accounts and I'm trying to create an e-mail thread between them with the Python Gmail API.
I can send e-mails without any issue, but when it comes to replying to each other and ...
38
votes
15
answers
89k
views
How to get list of folders in a given bucket using Google Cloud API
I wanted to get all the folders inside a given Google Cloud bucket or folder using Google Cloud Storage API.
For example if gs://abc/xyz contains three folders gs://abc/xyz/x1, gs://abc/xyz/x2 and gs:...
78
votes
8
answers
135k
views
How do I access (read, write) Google Sheets spreadsheets with Python?
I am wondering if you can point me to an example of reading/writing to/from a google doc/spreadsheet using python.
I did look at google docs API here https://developers.google.com/google-apps/...
0
votes
0
answers
79
views
How can I host a Python Web API built with Flask on IIS?
I have developed a Python-based Web API using frameworks such as Flask or FastAPI and need to deploy it on an IIS (Internet Information Services) server. The goal is to make the API accessible within ...
0
votes
0
answers
63
views
Vertex AI Feature Store - Unable to Fetch Historical Feature Values
I'm trying to retrieve historical feature values from Vertex AI Feature Store following the documentation. I'm running the example notebook from vertex-ai-samples. Everything works fine until running:
...
2
votes
2
answers
8k
views
ModuleNotFoundError: No module named 'google' with Python
I have a very simply program that I copied from Google's workspaces, the import statements are as follows
import os.path
from google.auth.transport.requests import Request
from google.oauth2....
0
votes
2
answers
2k
views
Sending PDF to gemini-1.5-pro-latest fail with 500 error
Below is a snippet that sends a prompt and a pdf file to gemini.
def runGemini(prompt, model, document=None):
model = genai.GenerativeModel(model)
content = prompt
if document:
...
5
votes
2
answers
16k
views
I get this error:- Error 400: redirect_uri_mismatch even after I registered the URI in Google Gmail API OAuth 2.0
Hello there I'm a newbie to programming. I was going to authenticate to Gmail API using oauth2 Authentication and I forgot to set the redirect URI at the first place. Then I registered it but I still ...
1
vote
2
answers
732
views
How do I set the project programmatically for the python SDK?
I do not want to set the project with the gcloud cli or environment variables, I want to do this programmatically. I'm attempthing to use client_options, but this is not working:
from google.cloud ...
12
votes
3
answers
20k
views
HttpError 403 with CONSUMER_INVALID as the reason when deploying a machine learning model to Google cloud's AI platform
I am following the tutorial here (https://cloud.google.com/ai-platform/training/docs/training-jobs#python_1) and using Python to deploy a machine learning model to Google cloud for training. However, ...