google-api-client

Google Drive api scope and file access (drive vs drive.files)

大兔子大兔子 提交于 2019-11-27 23:56:29
问题 I have created two refresh tokens for me: one for SCOPE = 'https://www.googleapis.com/auth/drive' and another SCOPE = 'https://www.googleapis.com/auth/drive.file' I'm trying to get information about files (using get method) Some files I can get when using SCOPE drive.files , and some only when using wider scope drive But I can not figure out what is the reason for that? Files are located in different folders but have one shared root folder. 回答1: The difference is that 'drive.file' only gives

Separating the Concerns of Activity and GoogleApiClient

拈花ヽ惹草 提交于 2019-11-27 22:31:19
As usual there is a lot of code in my LoginActivity and I really would prefer to separate the Activity responsibilities from the Google Play sign in concerns. After rewriting this LoginActivity code several times, in many different apps, the easy (and not so elegant) solution was create the Google API client as a Application class object. But, since the connection state affect the UX flow, I never was happy about with this approach. Is there an elegant way of place the GoogleApiClient outside the Activity ? 0. TL;DR For the impatient coder, a working version of the following implementation can

Retrieving information about a contact with Google People API (Java)

霸气de小男生 提交于 2019-11-27 22:31:07
I am using an example of recently released Google's People API from here . I have extended a sample a bit to display additional information about the contact such as an email address and a phone number. The code that should do the job is presented below. public class PeopleQuickstart { ... public static void getPersonInfo(Person person){ // Get names List<Name> names = person.getNames(); if(names != null && names.size() > 0) { for(Name personName: names) { System.out.println("Name: " + personName.getDisplayName()); } } // Get email addresses List<EmailAddress> emails = person.getEmailAddresses

Google Places AutoComplete on iOS - Can't Load Search Results - Try Again

北战南征 提交于 2019-11-27 22:24:11
I am posting this here because I don't know where else to post this. Today, our application is no longer returning results for Google Places API. We are seeing the request go through on the Google Developers Console, but all phones are returning no results. This number is climbing for today and each one of these users are stuck in the login / onboarding flow of my app. Update (Closer Image for the last hour): Here is an example flow of what I am seeing on all iPhones we are testing and receiving the same from our users. They search for their location. They might or might not see some

How to reset google oauth 2.0 authorization?

…衆ロ難τιáo~ 提交于 2019-11-27 20:40:06
I'm using Google APIs Client Library for JavaScript (Beta) to authorize user google account on web application (for youtube manipulations). Everything works fine, but i have no idea how to "logout" user from my application, i.e. reset access tokens. For example, following code checks user authorization and if not, shows popup window for user to log into account and permit web-application access to user data: gapi.auth.authorize({client_id: CLIENT_ID, scope: SCOPES, immediate: false}, handleAuth); But client library doesn't have methods to reset authorization. There is workaround to redirect

Google Login Hitting Twice?

霸气de小男生 提交于 2019-11-27 20:39:57
I'm using Google Login via JS and it appears my code is getting data twice. I'm not sure why this is occurring. When I click my "Log In with Google" button, it spits out (console.log(result)) data for the user. THEN a prompt occurs asking me to choose an account of mine (I'm logged into several google accounts). When I click the account I'd like, the code then spits out that user data again. Why is this occurring? It's a problem because where I spit out the data, I'd like to make a ajax call to verify the user and then redirect them. So in essence, it's trying to do this twice -- which is not

Google spreadsheet API, 400 error bad request : unable to parse range

夙愿已清 提交于 2019-11-27 20:23:53
I am trying to access Google spreadsheets using a spreadsheet example. When I run the example code it worked fine. I just change the SpreadsheetId and range. It started giving me: Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Unable to parse range: Class Data!A2:A4", "reason" : "badRequest" } ], "message" : "Unable to parse range: Class Data!A2:A4", "status" : "INVALID_ARGUMENT" } at com.google.api.client.googleapis.json.GoogleJsonResponseException.from

Automated use of google-api-dotnet-client with OAuth 2.0

我的未来我决定 提交于 2019-11-27 19:32:44
问题 I have a bunch of keys : client id, client secret, api key But all the documentation show authentication using human interaction. How do I use the dot net libraries for interacting with the Google API v3 and the AnalyticsService without user interaction? If I just use the API Key, I get "Google.Apis.Requests.RequestError Login Required" There are no samples that I can find anywhere that do this. EDIT : this is for one Google Analytics account, I have full access to it, username, password,

Error implementing GoogleApiClient Builder for Android development

给你一囗甜甜゛ 提交于 2019-11-27 19:18:52
I am following Google's documentation to implement Google+ Sign In feature into an app. https://developers.google.com/+/mobile/android/getting-started I followed each step according to the guide but got stuck in an error generated by the GoogleApiClient.Builder , I searched thoroughly but got no result. Please help me sort it out. Thank you. Error code: mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this).addApi(Plus.API, null) .addScope(Plus.SCOPE_PLUS_LOGIN).build(); Error Message : The method addConnectionCallbacks

GoogleApiClient onConnected never called on Wearable device

雨燕双飞 提交于 2019-11-27 17:05:51
问题 I have a wearable device that I'm trying to connect to the GoogleApiClient but the callbacks are never called (onConnected, onConnectionSuspended or onConnectionFailed). Everything else is working fine, the DataLayerListenerService is able to receive messages from the handheld and the onPeerConnected is being called when it connects. I've tried in on both the emulator and a Samsung Gear Live device. This is the code that I have in the Activity where I'm trying to connect to the