Questions tagged [oauth2client]

[DEPRECATED] The oauth2client python library made it easy to connect to resources protected by OAuth2.0. The library is deprecated. Use google-auth and oauthlib instead.

Deprecation Notice:

oauth2client is now deprecated. No more features will be added to the libraries and the core team is turning down support. We recommend you use google-auth and oauthlib. For more details on the deprecation, see oauth2client deprecation.


The oauth2client library comes as part of the google-api-python-client, but is also available as a separate download if you just need the OAuth 2.0 capabilities.

The library supports these Python environments:

  1. Python 2.4, 2.5, 2.6, 2.7
  2. Google App Engine
  3. Django

This is a pure Python library that can be used from any platform. Samples are included for Google App Engine, and Django. The library has been tested against the Google and DailyMotion implementations of OAuth 2.0.

210 questions
0
votes
0 answers

Weird issue with Python import in GAE while it works in terminal

from oauth2client import client, crypt While the above line works perfectly in ipython terminal on Mac OS. The same line shows error while running Google App Engine Project saying : ImportError: No module named oauth2client Anyone encountered the…
0
votes
1 answer

Access google analytics data with Django

I'm trying to build a super simple dashboard to show to users their Google Analytics data well formatted. I'm using oAuth2Client and Django 1.10.4 and Python 3.5. I've followed the example within the documentation and now I have a very simple app,…
Costantin
  • 2,486
  • 6
  • 31
  • 48
0
votes
2 answers

Google OAuth2client - invalid_grant: Token has been revoked

I'm writing a basic app that prints out projects in Google's Cloud Resources Manager using this method: https://cloud.google.com/resource-manager/reference/rest/v1/projects/list Yesterday it worked but I revoked the token and the code doesn't prompt…
0
votes
0 answers

Can't figure out how to implement Google Sign in with oAuth2

I am trying to create a login function for a web application and have been following the guide set out here https://developers.google.com/identity/sign-in/web/server-side-flow I have followed the instructions mostly copying everything and replacing…
0
votes
0 answers

Error during authentication using oauth2client

I have a Python program that attempts to use oauth2client for Google authentication so that I can use gspread. This is my code: import sys, os, requests, gspread, ast from oauth2client.client import SignedJwtAssertionCredentials f =…
0
votes
1 answer

gspread and oauth2client usage

I was trying to use oauth2client and gspread to operate on googlesheet but the problem i have is that when using oauth2client, it requires a field of scope. I have no idea what the scope is. The following is the code of the use of…
0
votes
2 answers

Dealing with OAuth 2.0 Token expiration at the Consumer

I have a client application that use the oauth2 with authorization grant type resource owner password credential. I write a curl http request to obtain the access token when user provide her credential, but how to request another access token when…
M.Abulsoud
  • 989
  • 7
  • 23
0
votes
1 answer

How to get OAuth token without user consent?

The standard (for me) OAuth flow is: generate url flow.step1_get_authorize_url() and ask user to allow app access get the code get the credentials with flow.step2_exchange(auth_code) But I faced with another service, where I just need to initiate…
LA_
  • 19,823
  • 58
  • 172
  • 308
0
votes
0 answers

UnicodeDecodeError while reading data from p12 file

The code works locally with 2.6 but when I deploy the same code on a server it's giving the following error when downloading my code from mail and then deploying it on server: File "/usr/lib/python2.6/site-packages/oauth2client/service_account.py",…
0
votes
1 answer

How do I implement the client_credentials grant for my OAuth2 Client

I recently implemented the client_credentials grant for my OAuth2 provider, which is based on Spring security OAuth2. Than I moved to the client to implement the mechanism there. I added the @EnableOAuth2Client annotation and set the following…
Robin Hermans
  • 1,579
  • 1
  • 24
  • 52
0
votes
0 answers

Getting 401 error(unauthorized) after 1 hour, while accessing the google spreadsheet

I'm trying to use the gdata.spreadsheets.client and OAuth2TokenFromCredentials to process a google spreadsheet. After 1 hour I receive a 401 error(unauthorized) due to access token expiration any way automatically refreshing the access token, though…
0
votes
1 answer

Problems using PyInstaller, gspread and oauth2client

I'm currently working on a project that heavily relies on gpsread (python 2.7). I'm in charge of creating a .exe but I've been running into some problems... I have PyOpenSSL installed and the program works fine from the .py I'm doing some testing on…
Alex
  • 1
  • 1
0
votes
1 answer

Nuitka/Pyinstaller, unable to load oauth2client libraries and others

I'm relatively new to Python. For a school project, I'm coding a relatively complex program. I need to make an executable file. I started testing with a fraction of the actual program, and I was unable to create a .exe file using PyInstaller,…
Alex
  • 1
  • 1
0
votes
1 answer

"ValueError: Invalid control character" using Python OAuth client

I am trying to load data from a google spreadsheet into a postgres database. The problem is when I am trying to authenticate my credentials, I get the following error: File "/usr/local/lib/python2.7/dist-packages/oauth2client/_openssl_crypt.py",…
johan855
  • 1,578
  • 4
  • 26
  • 51
0
votes
1 answer

Amazon Cloud Drive 404

I am trying to get an access_token using the code I get once the permission is granted by the resource owner. My request is like: URI: https://api.amazon.com/auth/o2/token…
Milind
  • 415
  • 8
  • 24