google-api-client

Replace OpenSSL in oauth2client.crypt to work with PyCrypto

跟風遠走 提交于 2019-12-07 16:21:35
问题 Google App Engine supports PyCrypto, but does not support OpenSSL. I want to use the oauth2client SignedJwtAssertionCredentials, which internally calls OpenSSL . Is there is a way to get oauth2client to work with PyCrypto. I am assuming that it might be possible to create a local version of SignedJwtAssertionCredential equivalent by using PyCrypto instead ? Also is there a way I can make a request to Google App Engine to provide a version that support the functionality for certificate

Google Android Drive api sign in fails on installed version

折月煮酒 提交于 2019-12-07 15:46:51
问题 I have developed an android application that uses the GoogleDrive api, When under debug or running the debug version, the application works fine, and correctly authenticates to the attached google account..etc. When I build a release version, (with my signed keys), and install the apk file, when I run, the Googleapiclient fails to "connect", using the same google account that works under debug, giving me a "Sign in Failed" message, after it tries once to resolve. 回答1: solution was here https:

google api client callback is never called

爱⌒轻易说出口 提交于 2019-12-06 21:25:57
问题 I am trying to get the last known location using google services API, but after I build the GoogleApiClient, no callback method is ever fired. My activity looks like that : public class MainActivity extends Activity implements FragmentObserver, SessionSpotListObserver, ConnectionCallbacks, OnConnectionFailedListener{ //Objects used for the location API private Location mLastLocation; private GoogleApiClient mGoogleApiClient; // Request code to use when launching the resolution activity

Auth.GOOGLE_SIGN_IN_API cannot be used with Games.API

半城伤御伤魂 提交于 2019-12-06 16:30:59
I'm trying to connect GoogleApiClient with Games.API and Auth.GOOGLE_SIGN_IN_API (for getting User Profile Information). Getting this Error: java.lang.IllegalStateException: Auth.GOOGLE_SIGN_IN_API cannot be used with Games.API Code: GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestProfile() .build(); googleApiClient = new GoogleApiClient.Builder(activity) .addConnectionCallbacks(connectionCallbacks) .addOnConnectionFailedListener(onConnectionFailedListener) .addApi(Games.API).addScope(Games.SCOPE_GAMES) .addApi(Auth.GOOGLE_SIGN_IN_API, gso

Google Places AutoComplete + Android Fragment

微笑、不失礼 提交于 2019-12-06 12:49:37
问题 I am a beginner on Android development and I came into a problem which I hope you can help me to solve. I'll keep it simple...i am trying to use Google Places autocompletion in a fragment...the app stops right from the beginning. My guess is the problem is when I use the method rebuildGoogleApiClient() and when I set up the PlaceAutocompleteAdapter after that. Here is my code: ( ActivityMap.java - sets up the GoogleMap and creates the fragment) public class ActivityMap extends

Google Cloud DNS Services - entity.change parameter is required but missing

感情迁移 提交于 2019-12-06 11:41:25
With the following code using Google's PHP API Client I am receiving this response. Google_Service_Exception with message 'Error calling POST https://www.googleapis.com/dns/v1/projects/PROJECT-NAME/managedZones/DNSZONE/changes : (400) The 'entity.change' parameter is required but was missing. Where PROJECT-NAME and DNSZONE are my project and zone. $client_email = MYCLIENT; $private_key = file_get_contents('config/credentials/KEY.p12'); $scopes = array('https://www.googleapis.com/auth/ndev.clouddns.readwrite'); $project = "PROJECT-NAME"; $managedZone = "DNSZONE"; $creds = new Google_Auth

Access denied for service account (permission issue?) when importing a csv from cloud storage to cloud sql

放肆的年华 提交于 2019-12-06 11:34:28
I'm trying to populate a mysql db with a csv that i have in cloud storage I'm using the API Explorer to execute the request with the following request body: { "importContext": { "csvImportOptions": { "columns": [ "col1", "col2", "col3" ], "table": "table_name" }, "database": "db_name", "fileType": "CSV", "kind": "sql#importContext", "uri": "gs://some_bucket/somecsv.csv" } } When i hit the execute button i receive a 200 response with the following body { "kind": "sql#operation", "selfLink": "https://www.googleapis.com/sql/v1beta4/projects/somelink", "targetProject": "some-project", "targetId":

Making calls from the Javascript client library with @Named and unnamed parameters makes no sense

邮差的信 提交于 2019-12-06 10:44:42
问题 I have a Cloud Endpoints method that looks like this: //HTTP POST @ApiMethod(name = "hylyts.insert") public Hylyt insertHylyt(@Named("url") String url, Hylyt hylyt, User user) throws OAuthRequestException{ log.info("Trying to save hylyt '"+hylyt+"' with id '"+hylyt.getId()); if (user== null) throw new OAuthRequestException("Your token is no good here."); hylyt.setArticle(getArticleKey(url, user)); ofy().save().entity(hylyt); return hylyt; } I call it from the Javascript Client Library using

How to copy entire sheets from google spreadsheet in nodes?

穿精又带淫゛_ 提交于 2019-12-06 10:21:48
问题 Hi I am using googleapis npm package for work with spreadsheet. I have a function which use to copy spreadsheet but problem is that it only copy one sheet however my source spreadsheet has mupltiple sheets. Here is my code:- const { google } = require('googleapis'); var sheet_id = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'; .. .. .. function copySpreadSheet(authClient, sheet_id) { console.log('sheet_id', sheet_id) const sheets = google.sheets({ version: 'v4', authClient }); sheets.spreadsheets.create({

How can I keep my google plus session opened after android application close?

一世执手 提交于 2019-12-06 09:01:01
this is my first time posting here because I've never had the need before because every question I had was already answered! The thing is that I'm trying to log in my android application with google plus but if I close my application.. I don't know how to see if the user was already signed in.. Is there any way to do check it? For example: - You login in my application and then you go to the MainActivity instead of the login activity. - Then you don't log out, you simply close my app for.. maybe half an hour.. - After that.. you open my app again and instead go to the MainActivity again.. you