Questions tagged [oauth2client]

0

votes
0

answer
7

Views

buildozer - kivy+gspread+oauth2client app crashes on start

After installing modules, I followed instructions to build an apk file. My app uses gspread and oauth2client. Put all the requirements in the buildozer.spec file. I run buildozer android debug deploy run logcat then the application crash after loading screen. The first thing I think the problem is...
DrCreampuff
1

votes
2

answer
2.1k

Views

OAuthWebSecurity.IsAuthenticatedWithOAuth - Method not found

I'm implementing an OAuth2Client and when I call var result = OAuthWebSecurity.VerifyAuthentication(); I result.IsSuccessful is equals to false. I've seen that "OAuthWebSecurity.IsAuthenticatedWithOAuth" method has the following exception: 'Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.IsAuthentica...
Guilherme Ferreira
6

votes
2

answer
1.8k

Views

Proxy configuration in OAuth2RestTemplate

I need to consume an API which is secured by OAuth2. For that I am using OAuth2RestTemplate. But am getting below error: java.net.ConnectException: Connection timed out: connect This is happening due to proxy issue. I Know how to set proxy in RestTemplate : SimpleClientHttpRequestFactory clientHt...
aks2012
3

votes
1

answer
2.5k

Views

'AttributeError: 'module' object has no attribute 'file'' when using oauth2client with Google Calendar

I'm using the example script for google calendars python api (https://developers.google.com/google-apps/calendar/quickstart/python#step_3_set_up_the_sample) to try and print out all the calendar events. However I am getting an error of: AttributeError: 'module' object has no attribute 'file' from t...
JMzance
3

votes
2

answer
2.2k

Views

Spring security Oauth2 client ClientAuthenticationProcessingFilter

I'm working on spring-security-oauth2-1.0.3.RELEASE, trying to set up an oauth client to get user authenticated with google. I spent quit a while on this and still don't find much good article explaining very clearly. What I'm doing is to put an OAuth2ClientAuthenticationProcessingFilter into the fi...
bolei
3

votes
1

answer
1.6k

Views

OAuth2 library for Erlang

In my project I need a client OAuth2 library. The project is written in Erlang. What are the options for the language? PS I am a newbie in Erlang, so documentation/examples are a must.
Vlad
6

votes
1

answer
3k

Views

AttributeError: 'module' object has no attribute 'SignedJwtAssertionCredentials'

Problem: I've been using Python Script Samples by Google to upload the apk to Play Store and to get list of apps published via my account (list_apks.py and upload_apk.py). However recently it started breaking. I've tried to update the packages like google-api-python-client, oath2client etc by doing...
Shobhit Puri
2

votes
1

answer
2.9k

Views

How to obtain oauth 2.0 token from google plus api in android?

I have a problem with obtaining oauth 2.0 token from google API. I am currently writing app for android, where I want to have three methods of signing in - via facebook (done), via custom oauth 2.0 provider (also done) and via google plus - it makes many problems for me. I need to get access token o...
Zkart
3

votes
1

answer
2.2k

Views

gmail api gives failedPrecondition error

I can't get gmail api to work. I'm using server-to-server authentication with JWT. google-api-python-client==1.4.0 httplib2==0.9 oauth2client==1.4.7 pycrypto==2.6.1 My code looks like this. with open(CLIENT_SECRET_FILE) as f: data = json.loads(f.read()) private_key = data['private_key'] client_email...
Tadas Vilkeliskis
2

votes
1

answer
288

Views

Python library that supports setting oauth response_type

The server I am working with does not support code as a response type. I attempted to use flask-oauth but it does not support setting a response type. I was wondering whether it was possible to configure flask-oauth to change it to token. I have tried doing it by setting: request_token_params = {'re...
24

votes
3

answer
4k

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 installing the API client pip install --upgrade google-api-python-client and setting things up like the c...
John Ruddell
5

votes
1

answer
2.1k

Views

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 refresh_token. Restored the credentials Credentials.new_from_json(cre...
Michael
1

votes
1

answer
622

Views

Google Python API tries to import the deprecated oauth2client.contrib.multistore_file

I am trying to build the discovery docs for my endpoints application, but I am getting the following error: [email protected]:~/backend$ endpointscfg.py get_discovery_doc [PROJECT_NAME] Traceback (most recent call last): File "/home/pc/Downloads/google-cloud-sdk/bin/endpointscfg.py", line 10, in import bootstr...
Borja
2

votes
1

answer
3.7k

Views

org.springframework.web.client.RestTemplate - POST request for resulted in 400 (Bad Request); invoking error handler

I'm looking to developed a Spring OAuth2RestTemplate code and taken a reference from Access tokens using 2 legged Oauth 2.0 and Apache OauthClient. There are two suggestions been given, First suggestion using Apache Oltu worked absolutely fine to me. Now, I am looking to developed second option whic...
2

votes
1

answer
1.1k

Views

Google App Engine - Endpoints API - Consuming from another App Engine App -python

I am trying to execute a function provided by one app engine app that I have written (python) that uses Endpoints, in a second similar app engine app. I currently have both app engine applications running on appspot using endpoints with oauth2. I have a working javascript client that consumes the en...
user3292469
3

votes
1

answer
3.3k

Views

PyCrypto Errors with .p12 file from Google Developer Console

I am trying to implement Google Identity Toolkit (gitkitv3) in GAE Python. After a user signs in on the website, I get the following errors: 'PKCS12 format is not supported by the PyCrpto library. ' NotImplementedError: PKCS12 format is not supported by the PyCrpto library. Try converting to a "PEM...
gsinha
2

votes
2

answer
3.2k

Views

oauth2client.client.CryptoUnavailableError: No crypto library available

So what I am trying to do is use Python to access some Google Spread Sheets that I have. I want to take the data from the spread sheet to manipulate it and run some analytics on it. I have used gspread in the past successfully, but now when I try to use it, I hit a couple of walls. When I run the fo...
Thomas
5

votes
1

answer
256

Views

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 second for more than 30 seconds (that's just 1 of 30...
Adam Pawluczuk
2

votes
1

answer
5k

Views

Facebook OAuth redirect_uri isn't an absolute URI. Check RFC 3986.\“,\”type\“:\”OAuthException\“,\”code\":191

I've been struggling this afternoon to put my application using facebook oauth. I am getting an error while trying to get the access token: {\"error\":{\"message\":\"redirect_uri isn't an absolute URI. Check RFC 3986.\",\"type\":\"OAuthException\",\"code\":191}} Here is my request: https://graph.fac...
Bonomi
4

votes
1

answer
618

Views

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 also in the API Console. What is the respective sig...
pinoyyid
14

votes
3

answer
6.6k

Views

got 'invalid_grant' in oauth2 SignedJwtAssertionCredentials

I am trying to make an oauth2 access_token in a server-to-server JSON API scenario. But it failed with invalid_grant error, please help. from oauth2client.client import SignedJwtAssertionCredentials KEY_FILE = 'xxxxxxxxxxxx-privatekey.p12' with open(KEY_FILE, 'r') as fd: key = fd.read() SERVICE_ACCO...
Pahud Hsieh
1

votes
2

answer
162

Views

How do I use google.auth instead of oauth2client in Python to get access to my Google Calendar

Several years ago I created a small Python program which were able to maintain my calendar using oauth2client which is now deprecated and replaced with google.auth - but I cannot find any useful documentation and my program stopped working complaining about a _module KeyError which nobody appear to...
Andrew Rump
3

votes
0

answer
735

Views

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. Which means my code looks like: import httplib2 impor...
laurenzlong
3

votes
1

answer
3.7k

Views

User Registration & Login | SSO using Spring Security OAuth 2.0

I am trying to implement user registration and log in flow | SSO using Spring Security Oauth 2.0 and Google as the authentication provider. How should I initiate registration and login flow? What filter needs to be applied? In registration flow, I will needs user's details (name, email) that are par...
Kumar Sambhav
4

votes
0

answer
197

Views

How to access OAuth 2.0, REST API in GNOME 3.0 shell extension?

How would I port the OAuth 2.0 implict grant flow from a browser environment if I wanted to access the REST API beneath it through a GNOME shell extension ? How would I redirect the user to the OAuth 2.0 decision endpoint through a login screen? If it isn't possible with a OAuth 2.0 REST API in wha...
Johny Jose
2

votes
1

answer
53

Views

Any way to get the raw response when OAuth2 code is exchanged with Google+ iOS SDK?

I am integrating the Google+ sign-in using Google's iOS SDK. Upon a user successfully authenticating, the function finishedWithAuth() gets called, with one of the parameters being an instance of GTMOAuth2Authentication. The client will need to send the credentials to the server, which is already usi...
Barney
8

votes
2

answer
3.9k

Views

How to share an Access Token between an MVC 5 web application and Web API 2 application

In this instance I am having the user log into the (MVC 5) Web application, which then acts as proxy to log into the (Web API 2) API (using basic over SSL) and return a Bearer/Access Token. I'm using the Thinktecture.IdentityModel.Client.OAuth2Client to handle the login and get the access token, whi...
teatime
1

votes
2

answer
1k

Views

How to authorize a Python Google API client service given an OAuth2 access_token?

I have implemented the python-social-auth library for Google OAuth2 in my Django project, and am successfully able to log users in with it. The library stores the access_token received in the response for Google's OAuth2 flow. My question is: use of the google-api-python-client seems to rely on crea...
Joe
3

votes
1

answer
294

Views

Please confirm: SignedJwtAssertionCredentials only works with SpreadsheetsClient, not SpreadsheetsService?

After a week of Googling and trial & error, I finally got my Python script that adds a row to a Google spreadsheet to work with OAuth2. For the benefit of others who may suffer the same trauma, here's my working code: script_dir = os.path.dirname(os.path.realpath (sys.argv[0])) private_key = open(s...
Pete Segal
3

votes
1

answer
468

Views

Gspread to access google spreadsheet: HttpAccessTokenRefreshError, invalid JWT

I'm struggling to get access to a google spreadsheet with python 2.7 using gspread. Here's what I have so far: import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ['https://spreadsheets.google.com/feeds'] credentials = ServiceAccountCredentials.from_json_keyfile...
Nick
2

votes
1

answer
92

Views

Windows local appengine usage: oauth2client ImportError

I m working with App Engine Standard, developing a Python backend service and, at some point, I told myself: "Hey why don't you try out and run the server locally while using the remote Datastore" I can run this code locally but I couldn't figure out why the remote_api_stub throws the error : " Fil...
RebH
1

votes
1

answer
721

Views

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 missing, currently I have: refresh_token := "some_...
Sredny M Casanova
2

votes
2

answer
214

Views

“'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 = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'] credent...
Kurt Peek
4

votes
2

answer
689

Views

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 https://accounts.google.com/o/oauth2/token. When I say "random", today it's more l...
Christophe Deliens
3

votes
1

answer
237

Views

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 oauth2client import file, client, tools SCOPES = 'https://w...
Sir Cost
4

votes
0

answer
905

Views

how to store google oauth token in django : Storage or database

The Google APIs python client has special support for the Django and in the examples given by Google (https://developers.google.com/api-client-library/python/guide/django), the class oauth2client.django_orm.Storage is used to store and retrieve Credentials objects. However, I find lots of examples...
yunshi
3

votes
1

answer
986

Views

Offline refresh token using Google APIs

I'm trying to use Google Analytics API and have access while the user is offline. I use the oauth2decorator_from_clientsecrets to get the credentials initially(which should request offline access by default). I am able to access the API for 1 hour before the token expires as expected. After this, I...
AshClarke
2

votes
1

answer
915

Views

How can I use saved tokens in NXOAuth2?

I am trying to implement a solution using the NXOauth2 pod to handle OAuth2 on my iOS app. I am able to go through the installed application flow to get OAuth2 properties including accessToken and refreshToken - and the account is being saved into my NXOAuth2AccountStore properly (verified by inspec...
Eric
2

votes
2

answer
969

Views

ImportError: No module named gspread

I'm trying to work with the gspread library in python. i installed the lib with pip install gspread but when I run the code: import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ['https://sreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'] cr...
Niels Dingsbums
2

votes
1

answer
37

Views

oauth2client throwing AttributeError when run as service

I'm trying to access the google calendar API with a simple python script, running on a raspberry pi. This script, from the example here: from oauth2client import file, client, tools store = file.Storage('home/pi/brief/token.json') creds = store.get() ..works fine when running from command line, bu...
Johannes Book

View additional questions