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
2 answers

Gmail auth token expires within an hour

Gmail auth token expires in one hour, is there any way to increase the lifetime of a token up to 24 hours or more? I'm using the following method: const oAuth2Client = await new google.auth.OAuth2(client_id, client_secret, redirect); // got the…
0
votes
1 answer

'Client' object has no attribute 'authorize' in gcp.How to solve this?

I'm deleting disks in GKE cluster.I'm using my JSON-key credentials to delete the disk associated with a specific cluster. Python from google.cloud import storage from googleapiclient import discovery from oauth2client.client import…
0
votes
1 answer

Is safe to have a client id without secret to use in web apps?

The only way that I found to not expose client secret on Front end was to create a client id without secret. Is safe to have a client id without secret to use in web apps?
John
  • 1,697
  • 4
  • 27
  • 53
0
votes
1 answer

Python Packages Not Working From Same Directory As Working Packages

I am using Python38. I am trying to create a script to create/modify google sheets. So I came across several articles detailing how to accomplish this: article1, article2, article3. Essentially it boils down to using two python packages: GSPREAD and…
0
votes
1 answer

Python Telegram bot on Heroku can't access Google Spreadsheet

I am deplying a python program on Heroku. Everything works fine locally, but it doesn't seem to run on Heroku The bot.py file contains two variables which are saved as config in Heroku: TOKEN and SPREADSHEET, these are the Token of the telegram bot…
David Wicker
  • 73
  • 1
  • 1
  • 13
0
votes
0 answers

how implement spring boot oauth2 sso with my own multiple web applications? these all application have own login page. is it possible or not?

We have multiple web applications, but our DB is conman for all. So, can we use "spring boot oauth2 sso" requirement need like this flow diagram implementation with all applications with separate login pages? We want to handle common authentication…
0
votes
1 answer

Serialize and de-serialize oauth2client.client.OAuth2Credentials

So I have an object, which is credentials from an OAuth2 authorization for a web service. I want to save the users credentials so I can continue to use them in the future. I'm using Django. The object is:
User
  • 23,729
  • 38
  • 124
  • 207
0
votes
1 answer

Invalid Syntax when importing ServiceAccountCredentials from oauth2client.service_account

I'm trying to import ServiceAccountCredentials from oauth2client.service_account in my AWS-Lambda code but it keeps on giving me the error Invalid Syntax. I run the normal code in my own PC and the code works, but when I move the code into my…
0
votes
0 answers

My webservice with oauth2client don't work on remote server,

The django app runs on the local server, but does not work on the remote. The server does not have a GUI and does not provide the user with a link to authorization. The server outputs link to the console. from __future__ import…
0
votes
1 answer

Why is oauth2client run_flow giving an Argparse error?

I have a python (2.7) program that uses oauth2client to access google drive. I'm trying to get my initial credentials file. I'm using this: from oauth2client.client import flow_from_clientsecrets from oauth2client.tools import run_flow SCOPE =…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
0
votes
0 answers

using oauth2client backwards to get the account name?

I've inherited a python (2.7) program which uses oauth2client to access a google drive. It appears that the credentials that the program is using has edit, but not create or delete permissions, which is not what we want. However, all I have is a…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
0
votes
1 answer

How do I find out what permissions a oauth2client credentials object has?

I have a python (2.7) program that's using oath2client to access googledocs. I'm able to create files and edit files, but not delete them. I assume that this is because of a permissions issue. Is there a way to find out what permissions my…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
0
votes
1 answer

python gspread, different user authority

I am currently trying to do 2 desktop apps. One for admin another one for user. The goal is to prevent user from editing spread sheets and only admin can edit them. In other words, admin has editor access, user has view access. What i did is: For…
Stark
  • 33
  • 4
0
votes
3 answers

Google Analytics Embed API Service Account Access Token

https://ga-dev-tools.appspot.com/embed-api/server-side-authorization/ I have created a Google service account in anticipation of using the Google Analytics Embed API and have been provided a .json key file. I am now attempting to execute the above…
0
votes
0 answers

Running Drive API Quickstart in IPython results in UserWarning and unrecognized arguments

I am trying to use the Google Drive API in Python. I tried Google's Quickstart example I followed the exact steps mentioned there: create a project, enable the drive API, download the credentials file. I have made a separate folder for my project.…