google-api-client

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

与世无争的帅哥 提交于 2019-11-26 20:19:11
问题 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" :

GoogleApiClient is throwing “GoogleApiClient is not connected yet” AFTER onConnected function getting called

断了今生、忘了曾经 提交于 2019-11-26 20:18:40
So i found something that is not very clear for me about GoogleApiClient. GoogleApiClient has a function called onConnected which is ran when the client is connected (for sure) I got my own function called: startLocationListening which is eventually getting called on GoogleApiClient's onConnected function. So my startLocationListening function couldnt ran without a GoogleApiClient connection. Code and log: @Override public void onConnected(Bundle bundle) { log("Google_Api_Client:connected."); initLocationRequest(); startLocationListening(); //Exception caught inside this function } ... private

Error implementing GoogleApiClient Builder for Android development

戏子无情 提交于 2019-11-26 19:49:24
问题 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

Failed sending mail through google api with javascript

隐身守侯 提交于 2019-11-26 14:35:14
问题 I'm trying to send an email through Google API with JavaScript. My issue is that when I try to send a simple mail with no attachments, I get the following error: 'raw' RFC822 payload message string or uploading message via /upload/* URL required` My code function sendMessage() { gapi.client.load('gmail', 'v1', function() { // Web-safe base64 var to = 'someone@someone.nl', subject = 'Hello World', content = 'send a Gmail.' var base64EncodedEmail = btoa( "Content-Type: text/plain; charset=\"UTF

How do I add/create/insert files to Google Drive through the API?

删除回忆录丶 提交于 2019-11-26 14:18:37
Need help regarding inserting a file to google drive through api. The api documentation for this purpose does not clearly explains how to send the actual body of the file through http post request. The documentation on insert operations already contains examples in a bunch of programming languages, here is how to do it using the HTTP based protocol of the Google Drive API. First, POST the new file metadata to the Drive endpoint. It has to be in the form of a File resource JSON object : POST /drive/v2/files HTTP/1.1 Host: www.googleapis.com Authorization: Bearer <OAuth 2.0 access token here> ..

Is it possible to be able to correctly select any available Google account to use when using authorisation via the JS client library for Drive?

蓝咒 提交于 2019-11-26 13:03:45
问题 I\'ve got an existing Google Drive enabled application that\'s using the Google Java client library and server flow auth. If you\'re not logged into the application and navigate to the URL AND you have logged into more than one google account on that browser (only one personal Google account is possible, any additional ones have to be Google business accounts) the OAuth callback offers the options to select which Google Account to use. However, whilst testing a switch to using the JavaScript

using enableAutoManage() in fragment

给你一囗甜甜゛ 提交于 2019-11-26 12:42:51
问题 Is there another way to connect Google API client? I use auto complete places and I have to use this code some where in MYFRAGMENT mGoogleApiClient = new GoogleApiClient.Builder(MainActivity.this) .addApi(Places.GEO_DATA_API) .enableAutoManage(this, GOOGLE_API_CLIENT_ID, this) .addConnectionCallbacks(this).build(); My problem with enableAutoManage(this, GOOGLE_API_CLIENT_ID, this) .addConnectionCallbacks(this).build(); I can\'t deal with it because when I replace this with getActivity() I

Get person details in new google sign in Play Services 8.3

和自甴很熟 提交于 2019-11-26 11:23:49
问题 I\'m trying to get a user\'s profile using the new Google Sign In API introduced in play services 8.3. Other than Display Name, Email and Id, I also need user\'s gender. Plus.PeopleApi.getCurrentPerson() is deprecated as per play services 8.3 and also returns null for me even though mGoogleApiClient.hasConnectedApi(Plus.API) returns true. GoogleSignInAccount.getGrantedScopes returns https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.login profile email openid Google

How do I add/create/insert files to Google Drive through the API?

不想你离开。 提交于 2019-11-26 03:50:36
问题 Need help regarding inserting a file to google drive through api. The api documentation for this purpose does not clearly explains how to send the actual body of the file through http post request. 回答1: The documentation on insert operations already contains examples in a bunch of programming languages, here is how to do it using the HTTP based protocol of the Google Drive API. First, POST the new file metadata to the Drive endpoint. It has to be in the form of a File resource JSON object: