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
5
votes
4 answers

"'Credentials' object has no attribute 'access_token'" when using google-auth with gspread

I'd like to use gspread module to edit Google sheets from Python. The setup instructions contain the following example: import gspread from oauth2client.service_account import ServiceAccountCredentials scope =…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
5
votes
1 answer

Unrecognized arguments using oauth2 and Google APIs

I'm using the Google API services in some scripts and having some problems. This error is something weird, but here we go. I have a script that is listing my Google Drive files. from apiclient import discovery from httplib2 import Http from…
5
votes
1 answer

GAE - unable to fetch URL from BigQuery API

Our integration platform now gets couple of "Unable to fetch URL: ..." errors everyday. I don't know what's the cause of this. First GAE tries to authorize with OAuth2 from within application to BigQuery through the BigQuery API. it tries in every…
5
votes
1 answer

oauth2client Credentials refresh_token becomes null

Backgound I got access_token to Google API using the google-api-python-client django_sample. To have offline access, I've added FLOW.params['access_type'] = 'offline'. Stored credentials_json = credentials.to_json(). It contains a…
Michael
  • 3,206
  • 5
  • 26
  • 44
5
votes
0 answers

EOF error with Google oauth2client (Python, google-app-engine)

I am currently using oauth2client in my Python webapp in order to use Google's calendar API. I copied oauth2client into the root folder of my directory, and followed instructions at https://developers.google.com/google-apps/calendar/instantiate.…
laurenzlong
  • 2,169
  • 1
  • 13
  • 13
5
votes
4 answers

What is the OAuth scope for the Google Translation API?

Surely someone else is using the API, I've looked and searched, I cannot seem to find the correct value to place for the scope parameter when authenticating: I've looked at all these scope lists, nothing, tried the OAuth 2.0 playground, translation…
4
votes
1 answer

SSL error when using google-api-python-client init() method

python==3.8.2 google-api-python-client==1.6.5 1.9.3 Hello, I'm having a SSL error when using google-api-python-client. Calling to sample_tools.init() for getting a service object triggers an error. This was working before I reinstalled Kubuntu and…
madtyn
  • 1,469
  • 27
  • 55
4
votes
0 answers

Spring Boot as a resource server (JWK validation) & Angular/Cordova as front end - OAuth2 for social Login (Facebook & Google) support

I am stuck with the implementation of spring boot as a resource server for multiple authorization servers for validating the access/id tokens provided by authorization servers (such as google, facebook via front end libraries). Here is the…
4
votes
2 answers

Google App Script API cannot authenticate "Request contains an invalid argument"

I am pretty much using the sample from google's own site https://developers.google.com/apps-script/api/how-tos/execute The relevant part of the sample python script is replicated below from __future__ import print_function from googleapiclient…
4
votes
1 answer

How to use the Google API without checking a client_secret.json into version control?

I'm working on a project in which, in accordance with https://12factor.net/config, we don't things like credentials in our code, but rather in environment variables. I'm looking into using the Google Sheets API to collate some data from our database…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
4
votes
1 answer

Renew Access Token using Golang Oauth2 library

I am working in a Golang application, this one is connected to a Oauth2 service, right now I have the refresh token and I need to get a new access token with it, I am using golang.org/x/oauth2 but it wans't successful, so there's something that I am…
Sredny M Casanova
  • 4,735
  • 21
  • 70
  • 115
4
votes
2 answers

HybridAuth with Google provider randomly returns "invalid_request" when authenticating

We use Google OAuth2 to authenticate our users into an internal application, using HybridAuth 2.4.0 and it went well until about a week ago where we started to see more and more random "invalid_request" responses from…
4
votes
0 answers

Python gmail oauth SSL: CERTIFICATE_VERIFY_FAILED

I'm on arch linux. Copied the gmail example from: https://developers.google.com/gmail/api/quickstart/python The code is working well on Ubuntu, but on arch I have this error: Traceback (most recent call last): File "gmail.py", line 70, in…
Max
  • 131
  • 1
  • 7
4
votes
1 answer

is there a deep dive on google's oauth2 scopes?

I'm looking for some deep down detailed information on google's use of oauth scopes My Drive app is working, so I get the simple use of scopes. However I have the following detailed questions/issues.. I specify scopes twice. Once in my app and then…
pinoyyid
  • 21,499
  • 14
  • 64
  • 115
3
votes
2 answers

how to specify the scope with oauth2 client application

I am using Spring Security OAuth2 client application and have provided the below configuration spring: security: oauth2: client: registration: okta: client-id: client-secret: …
1
2
3
13 14