2
votes
2answers
1k views

Google Drive Python API resumable upload error 401 after 2 hours

First of all, I'm sorry if this is a too silly question... this is the first time I'm trying to use any of the technologies involved in this script (Python, the drive api, oauth 2.0, etc). I swear ...
5
votes
2answers
3k views

Create a empty spreadsheet in google drive using google spreadsheet api (python )?

I want to create a empty spreadsheet(only with metadata) in google drive , when I refered the google SpreadSheet Api , it says to use the documents list api , but currently the document api is ...
3
votes
1answer
2k views

How to avoid 'Failed to retrieve access token: { “error” : “invalid_grant” }' in offline GAE cron tasks?

This post is a followup to How to make 'access_type=offline' / server-only OAuth2 operations on GAE/Python. The http = credentials.authorize(httplib2.Http()) part no longer fails when testing, but it ...
4
votes
2answers
486 views

How can I log in to an arbitrary user in appengine for use with the Drive SDK?

I have an application that needs to log into a singular Drive account and perform operations on the files automatically using a cron job. Initially, I tried to use the domain administrator login to do ...
3
votes
1answer
564 views

How to do OAuth-requiring operations in a GAE cron job?

This post is a followup to How to do OAuth-requiring operations in a GAE Task Queue?. As suggested by bossylobster in this post, I did try to hardcode the user_id in my script, but the cron task ...
2
votes
1answer
2k views

How to make 'access_type=offline' / server-only OAuth2 operations on GAE/Python?

This post is a followup to How to do OAuth-requiring operations in a GAE cron job?, where I realized I'm mis-using the @oauth_required decorator from OAuth2DecoratorFromClientSecrets. As described by ...
2
votes
1answer
563 views

How to properly define GAE's oauth2callback?

The Using GAE / Decorators guide tells me that "you need to add a specific URL handler to your application to handle the redirection from the authorization server back to your application": def ...
1
vote
1answer
2k views

Uploading an image to GDrive using API - Python [closed]

I want to upload aj image to Google Drive. The image is in the same directory of the script i did to upload the image. I have this code in a script.py file #!/usr/bin/python import httplib2 import ...
9
votes
2answers
4k views

Google Calendar API v3 - How to obtain a refresh token (Python)

I am trying to write a Django app which creates events in a specific Google calendar. So far I have been successful. There is only a little problem: I don't know how to obtain a refresh token with ...
5
votes
0answers
1k views

New Python 3 port of Google Python API Client [closed]

I have wanted to use the Google API Python client with Python 3.x. Apparently nobody has done a port of this code to the new language specification, even though Py3K has been around since at least ...
5
votes
2answers
183 views

bq.py Not Paging Results

We're working on writing a wrapper for bq.py and are having some problems with result sets larger than 100k rows. It seems like in the past this has worked fine (we had related problems with Google ...
3
votes
3answers
3k views

Unauthorized interaction with google calendar API v3

I'm in the same situation as this guy (only that my problem is with python): I'm trying to retrieve data using a service account (using this example and after reading this blog entry since my ...
2
votes
1answer
620 views

How to do OAuth-requiring operations in a GAE Task Queue?

I have a simple Google App Engine app that includes a /update page which updates a YouTube playlist. It looks like this: class UpdatePage(webapp2.RequestHandler): @decorator.oauth_required ...
2
votes
2answers
2k views

OAuth2 authentication in GAE accessing Calendar API V3 (domain hosted)

I'm developing a Google App Engine app with Python. And I'm using: Google Calendar API v3 (to access a calendar in my own domain. So, this is Google Apps installed in my domain) Google APIs client ...
1
vote
2answers
964 views

Google AppEngine to Fusion Tables with Service Accounts

Late to the game on migrating to the /v1 Fusion Table API but no holding off any longer. I'm using Python on AppEngine and trying to connect to Google Fusion Tables with Google Service Accounts (the ...
0
votes
0answers
142 views

Python can't find module 'clientsecrets' when trying to set up oauth2 in Django using the Google Python API

I installed the Google APIs Client Library for Python on my Windows 7 box using pip. I am following the Django example that Google provides, but I can't start my server because Python throws an ...
0
votes
2answers
675 views

google drive api crash with desktop application

I use google drive application wrote a desktop application using python and everything works fine. But when I use pyinstaller to output a .exe file and run that application. A problem occurs on these ...
9
votes
1answer
225 views

How to get Google Analytics credentials without gflags - using run_flow() instead?

This may take a second to explain so please bear with me: I'm working on a project for work that requires me to pull in google analytics data. I originally did this following this link, so after ...
0
votes
1answer
542 views

How to authenticate with Google Spreadsheets API using Python client / discovery service?

I'm using Python 2.7 and the client library for Google API which I am trying to use to get authenticated access to Spreadsheets like so: # sa == Service Account scope = ...
3
votes
1answer
249 views

Google BigQuery Incomplete Query Replies on Odd Attempts

When querying BigQuery through the python api using: service.jobs().getQueryResults We're finding that the first attempt works fine - all expected results are included in the response. However, if ...
1
vote
1answer
1k views

Errno 185090050 _ssl.c:343: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib, after packaging to exe by PyInstaller

I code a python script to check files in GCS, it uses wxpython to generate the GUI. To authenticate I did it in this way(following the way in Google sample code -> ...
0
votes
1answer
80 views

How to use a service account with Google's python api and drive?

I try to write python 2.7 script to upload a file into my personal google drive folder. After several problems I stuck know. This is my current error: NotImplementedError: PKCS12 format is not ...
0
votes
1answer
37 views

How to pass body with Google APIs Client Library?

I use Google APIs Client Library for Python to work with Fusion Tables API. importRows method here requires to provide the data in the body. How should I do it? response = ...
0
votes
1answer
175 views

How would one convert/wrap a HTTPLib2 instance as a Session?

I know the title is a big wonky and I apologize for that. The dilemma I have is that gspread uses Session and the Google APIs client library for Python uses HTTPLib2. I have a service account that I ...
0
votes
1answer
2k views

Google API Custom Search with Python - Programmatic Search Results

I am trying to use the Google API Custom Search, and I don't have any clue where to start. It seems you have to create a "custom search engine" in order to parse search results, and you are limited to ...
0
votes
1answer
881 views

google-app-engine : ImportError httplib2 in google api python client hello world

I just downloaded the Google App Engine SDK for python (google_appengine_1.6.5.zip) and i try to launch an example from google-api-python-client (appengine) : $ tree . |-- app.yaml |-- ...