FAQ Database Discussion Community


Unable to import import com.google.api.client.http.HttpTransport

android,jar,google-api-java-client
I am unable to import com.google.api.client.http.HttpTransport I have tried downloading all dependencies from https://developers.google.com/api-client-library/java/google-api-java-client/download And then adding them to my project by Project > Open Module Settings > Dependencies > + > File Dependency > google-api-client-android-1.20.0.jar > OK With no luck....

Null Pointer Exception when accessing Google Analytics report data using different credentials

java,nullpointerexception,google-oauth,google-analytics-api,google-api-java-client
I am following the tutorial to get access to the GA account report data by executing a simple GA query, by using the Google Developers console. I followed all steps mentioned in the tutorial and the code works fine. I have included the code below. public class GoogleAnalyticsAccess { private...

Getting user credentials using Google+ API

android,google-app-engine,google-api,google-api-java-client
I am trying to include Google sign in in my android application using Google+ Api. I am able to take account details from the user but once signed in I am getting null when requesting for username using call: Plus.PeopleApi.getCurrentPerson(mGoogleApiClient).getDisplayName() And Logcat shows: BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me...

Java Google Coantacts API Access Service Account Authentication

java,google-api,authorization,google-oauth,google-api-java-client
I'm trying to access Googles Contacts API but my attempt failed already on getting authorized. From other (web) languages i'm used to the APIConsole and the public API-key (authorization). GoogleCredential credential = new GoogleCredential().setAccessToken("<<PublicAPIKey>>"); System.out.println(credential.refreshToken()); // false This way I'm not able to refresh the token and be unsure about...

finished with non-zero exit value 2 when I use google login api

java,android,google-api,google-api-java-client,google-login
I want to access the google account to login my app,and I get: Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2 My build.grade: apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion '22.0.1' defaultConfig { applicationId "nthu.nf.project.moocs" minSdkVersion 15 targetSdkVersion 21...

“Cannot find DriveId. Are you authorized to view this file?”: Even if EXISTING_FOLDER_ID is set manually

android,google-api,google-drive-sdk,google-api-java-client,google-drive-android-api
I am having a look at here from github. I can create a file and a folder successfully by reading the code provided in github. But I am not being able to edit the file or create a file/folder in any specific folder. The main problem would be using emulator,...

Using scala to access google API, front end in Ruby on Rails

java,ruby-on-rails,scala,google-api-java-client
So my main application is written in Ruby/Rails and that is where the preliminary oauth2 action is happening. Currently I store the email and refresh token from that initial interaction, and now want to use a Scala script to retrieve data from the api in the background using the users...

Google api Java client: access token expiration

google-api-java-client
I am using the Java sdk for getting user and group data in a server to server flow and everything works OK. The SDK nicely hides all the OAuth complexity and the request.execute() method makes a first HTTP call to get the OAuth token and a second call to the...

Batch requests throws 404 not found

google-app-engine,google-cloud-endpoints,google-api-java-client
I'm using the Google Apps Java client library to develop an Android application. I am trying to send a batch request as explained here. This is my request code for the discovery endpoint, which you can see has a batchPath field with "batch" as value: BatchRequest batchRequest = mApi.batch(); mApi.insert(mEntity).queue(batchRequest,...

Google API: object oauth2 is not a member of package com.google.api.services

google-api,playframework-2.0,sbt,google-api-java-client,google-api-client
I'm developing a web backend using the Google APIs. In order to get the email address of a user, you have to send your access token to a Google tokenInfo service, that will return general information (including your email address). In general Google APIs do not return you the mail...

Drive API access to document with service account

google-drive-sdk,google-api-java-client
I'm attempting to access a spreadsheet that's under the "google.com" domain using the Google Drive Java API through a service account. I need to export several of the worksheets contained within the document. I've been able to create and use a service account (used via the Java API) but am...

what is the deprecation policy of google's appsforyourdomain clients

google-api-java-client,google-admin-sdk
It is clear that some of the client classes in the appsforyourdomain package are being deprecated by April 20th, 2015. I'm having trouble finding the deprecation status and replacement of these classes: com.google.gdata.client.appsforyourdomain.audit.AuditService com.google.gdata.client.appsforyourdomain.audit.MailBoxDumpRequest com.google.gdata.client.appsforyourdomain.audit.MailMonitor com.google.gdata.client.appsforyourdomain.AppsForYourDomainQuery com.google.gdata.client.appsforyourdomain.AppsPropertyService...