1,683 questions
1
vote
1
answer
537
views
How to Capture The OAuth Redirect to POST A Response
So my colleague and I have an application whereby we need to capture the OAuth Redirect from Google's OAuth Server Response, the reason being is we need to send a payload to capture to renew our ...
2
votes
1
answer
383
views
Google's quickstart.py not connecting to Google Workspace API because of JSONDecodeError: Extra data
I am following the steps in https://developers.google.com/gmail/api/quickstart/python to create their example application that can print a Gmail user's labels. I get JSONDecodeError: Extra data ...
1
vote
1
answer
750
views
Google drive api authorization returns 404 not found error, after authorization accepted
from googleapiclient.http import MediaFileUpload
from Google import Create_Service
from googleapiclient.http import MediaIoBaseDownload
import google_auth_oauthlib
import pypandoc
import random
import ...
0
votes
1
answer
1k
views
Inline / embedded attachments in emails sent by Google API through Python are also shown attached
I've been losing my mind over this issue for the past few days. To clarify my issue, I am trying to send emails with images embedded in them. I mostly use these embedded images for footer or social ...
0
votes
0
answers
175
views
Youtube Data API 403 forbidden after numerous successful thumbnails.set() calls
def update_thumbnail_on_youtube(video, path):
try:
request = youtube.thumbnails().set(videoId=video['id'], alt="media", media_body=MediaFileUpload(path))
...
-1
votes
2
answers
1k
views
Google Cloud Storage XML file Conversion to CSV or JSON format
I am looking into ways of converting XML files from Google Cloud Storage to the JSON or CSV file format and storing it in another GCS bucket.
Anyone would have any suggestions on how to do it? I have ...
2
votes
3
answers
2k
views
Why does it turn into an unavailable room when I create a google resource calendar with its API?
I'm going to create a google resource calendar room via its API (i.e. https://admin.googleapis.com/admin/directory/v1/customer/my_customer/resources/calendars). But the problem is, when I create one, ...
1
vote
1
answer
2k
views
Google SheetsAPI: ValueError: Client secrets must be for a web or installed app
Very similar to this question: ValueError: Client secrets must be for a web or installed app but with a twist: I'm trying to do this through a Google Cloud Virtual Machine.
Recently, the Out-Of-Band (...
0
votes
2
answers
411
views
Google Auth Service Account Bearer Photo API
I am trying to upload an image to google photos service using a google service account with a domain-wide delegation to use a [email protected] account.
Somehow I only get a 401 error: "...
1
vote
1
answer
1k
views
503 service is unavailable in Analytics Reporting API V4
Sample Call:
https://analyticsreporting.googleapis.com/v4/reports:batchGet?alt=json
Sample Error:
googleapiclient.errors.HttpError: <HttpError 503 when requesting https://analyticsreporting....
5
votes
2
answers
8k
views
ACCESS_TOKEN_SCOPE_INSUFFICIENT error with updating sheet using google sheets api (python)
I've been making a program in python that is intended to have each user be able to use it to access a single google sheet and read and update data on it only in the allowed ways, so ive used google ...
0
votes
1
answer
796
views
How to fix Python import google API error
from googleapiclient.discovery import build
After pip installing google api for python google tells me to use this command however the command doesn't work!
Can anyone help?
https://developers.google....
0
votes
1
answer
316
views
Python googleapiclient cannot get more than 10 results
With this code:
import json
from googleapiclient.discovery import build
from pprint import pprint as pp
NUM_RESULTS = 11
MY_SEARCH = 'bordben'
MY_API_KEY = '...'
MY_CSE_ID = '...'
def google_search(...
0
votes
1
answer
2k
views
GCP: Allow Service Account to Impersonate a User Account with Google Analytics Scopes
I am trying to create a script that enables a Service Account [email protected] to impersonate a user account [email protected] with the following GA scopes:
target_scopes = ['...
1
vote
1
answer
6k
views
Sending email as a service account gmail api
To be clear:
I'm not impersonating another user. I'm sending the email from the service account and the receiver will see the name of the service account as the sender
I have already enabled gmail ...
1
vote
0
answers
128
views
ImportError: cannot import name 'pluggable' from 'google.auth' (/opt/anaconda3/lib/python3.9/site-packages/google/auth/__init__.py)
Even though I did
pip3 install google-auth that doesn't resolve the error, any idea?
File "/opt/anaconda3/lib/python3.9/site-packages/gslib/utils/wrapped_credentials.py", line 33, in <...
1
vote
1
answer
1k
views
Google Ads API: How to Send Batch Requests?
I'm using Google Ads API v11 to upload conversions and adjust conversions.
I send hundreds of conversions each day and want to start sending batch requests instead.
I've followed Google's ...
0
votes
1
answer
226
views
Several error working with blogger/google API using python and service account auth
I'm trying to access blogger API using the official Google python library and a service account with a JSON key file made at the Google Developer console.
I'm using Linux Debian.
google-api-python-...
1
vote
1
answer
664
views
add new contact to group using google people API with python
I am trying to create a code that saves new contacts and puts them in a certain group.
Creating a contact works great-
service = build('people', 'v1', credentials=creds)
service.people().createContact(...
0
votes
0
answers
344
views
How to download attachment from Gmail with specific keyword within subject line and by date
My work requires me to download data (csv file or files) from Gmail every day. I am able to execute the code below for attachment download by email identifier using fetch(), but I want to download ...
0
votes
0
answers
54
views
Google API service object is not created when ran as exe
I've written a script to add events to Google calendar using the Google Calendar API for python. It works perfectly when ran as just a python script but after making it an exe with pyinstaller it ...
0
votes
1
answer
192
views
google developer console API library is only opening to a blank screen?
for a project I need to use the google API to have a google sheets that a python script can read and write to from any computer, but the google developer console isn't working as intended as far as I ...
0
votes
1
answer
536
views
Passing Cloud Storage custom metadata into Cloud Storage Notification
We have a Python script that copies/creates files in a GCS bucket.
# let me know if my setting of the custom-metadata is correct
blob.metadata = { "file_capture_time": some_timestamp_var ...
1
vote
2
answers
5k
views
Problem importing documentai module from Google Cloud
I am trying to run the quickstart code snippet from Google Cloud tutorials and somehow the line
from google.cloud import documentai_v1 as documentai
I get this error:
Cannot find reference '...
1
vote
1
answer
927
views
How to get all user's files on Google Drive using Google API Python SDK?
I have this Python code, that shows all files from Google Drive:
files = []
page_token = None
while True:
response = service.files().list(spaces='drive',
fields=...