Questions tagged [google-api-java-client]

The Google APIs Client Library for Java is a flexible, efficient, and powerful Java client library for accessing any HTTP-based API on the web, not just Google APIs.

Filter by
Sorted by
Tagged with
82 votes
9 answers
71k views

Exception using HttpRequest.execute(): Invalid use of SingleClientConnManager: connection still allocated

I'm using google-api-client-java 1.2.1-alpha to execute a POST request, and am getting the following stacktrace when I execute() the HttpRequest. It happens immediately after I catch and ignore a ...
David Bullock's user avatar
104 votes
8 answers
85k views

Error: 'The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.'

I am getting the following error while accessing Google Play Developer API using a service account: The project id used to call the Google Play Developer API has not been linked in the Google Play ...
Koushik Goswami's user avatar
76 votes
2 answers
161k views

OAuth2 and Google API: access token expiration time?

We have a standalone Java application (see "Installed application") which runs periodically and uses Google API (updates some information from customer databases/ldap/...). To access Google APIs we ...
Martin V.'s user avatar
  • 3,560
23 votes
6 answers
14k views

Google push notifications - Unauthorized WebHook callback channel

I'm facing problem with Google push notifications (for drive). I use service account which works perfectly for all other drive operations except drive changes watch. Below is application code which ...
user3686724's user avatar
6 votes
2 answers
9k views

Migrating 50TB data from local Hadoop cluster to Google Cloud Storage

I am trying to migrate existing data (JSON) in my Hadoop cluster to Google Cloud Storage. I have explored GSUtil and it seems that it is the recommended option to move big data sets to GCS. It seems ...
obaid's user avatar
  • 285
3 votes
3 answers
29k views

Getting a 403 - Forbidden for Google Service Account

I am trying to get an access token for Google Service Account. Following is my code - String SERVICE_ACCOUNT_EMAIL = "[email protected]"; List scope = new ArrayList(); scope.add("...
Sayali's user avatar
  • 356
41 votes
3 answers
25k views

Access to Google API - GoogleAccountCredential.usingOAuth2 vs GoogleAuthUtil.getToken()

Lately, I have been working a lot with Google APIs on Android especially Analytics, AdSense and Tasks API. I have seen some samples provided by Google where they use this statement to obtain a ...
Madhur Ahuja's user avatar
  • 22.2k
32 votes
2 answers
3k views

Google Drive 403 rate limit on insert sometimes succeeds

tl;dr A Drive API call returns a failure status (403) even though the request was successfully processed. I insert 100 files in a loop. For this test I have DISABLED backoff and retry, so if an ...
pinoyyid's user avatar
  • 21.5k
26 votes
7 answers
6k views

Google Drive API doesn't play well with ProGuard (NPE)

Currently, I'm having experience that, a piece of code, which makes use of Google Drive API is running fine without introducing ProGuard. However, after introducing ProGuard, I'm getting the ...
Cheok Yan Cheng's user avatar
24 votes
6 answers
22k views

Uploading image from Android to GCS

I am trying to upload an image from Android directly to Google cloud storage. But the API does not seem to work. They have some Java samples which are tied to the App engine. I don't see any sample ...
Gopinath's user avatar
  • 13k
9 votes
2 answers
8k views

StorageServiceAccountSample application reports "KeyStore JKS implementation not found"

The very first line of StorageServiceAccountSample HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport(); causes the "KeyStore JKS implementation not found": W/System.err(20142): java....
Sailor Jerry's user avatar
39 votes
5 answers
17k views

Loading Google API Javascript Client Library into Chrome Extension

I've been trying to wed the google api javascript client library with a chrome extension for a while now, but it seems the chrome extension has a terrible case of cold feet. The link to the script is ...
woojoo666's user avatar
  • 7,821
21 votes
5 answers
37k views

com.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example

I tried running the quickstart-sample, and this dependency: <dependency> <groupId>com.google.apis</groupId> <artifactId>google-api-services-drive</artifactId>...
eclipse's user avatar
  • 2,831
17 votes
3 answers
14k views

What is an example of using OAuth 2.0 and Google Spreadsheet API with Java?

Where is example code showing how to use the Google Data Java Client Library and its support for OAuth 2.0 with the Google Spreadsheet API (now called the Google Sheets API)?
user2952212's user avatar
9 votes
4 answers
5k views

Write to GoogleSheet via API with Java

I am trying to write a value to a cell with Google Sheet API with Java. For reading I used guide from Java Quickstart which worked fine for me. For writing to Google Sheet I use: service....
Alex Kolo's user avatar
  • 243
5 votes
1 answer
6k views

gdata-java-client + oauth2 + access_token secret

I'm currently trying to use the new java client(s) and due to legacy reasons for current state of google libraries, I need to use both the gdata and the new google java client api. Obviously I'd ...
Java Guy's user avatar
  • 1,005
4 votes
4 answers
14k views

Google Directory API returns Not Authorized when call users().list().execute()

I need to read the list of users (and groups) from my google domain. So I went to my Google APIs Console and enabled Admin SDK and created a Service Account to call Google APIs. I use the following ...
dmitry747's user avatar
  • 573
2 votes
1 answer
2k views

Authenticate service account without downloaded key on google app engine

I am working on a product that is supposed to be installed in Google App Engine. In this I am using Service account for authenticating Gmail API, Drive API, Calendar API etc. Its working fine with ...
compyutech's user avatar
2 votes
3 answers
10k views

Getting null Refresh token

I'm using the google-api-java-client version 1.8-beta for oAuth2 authentication with Google accounts. Everything fine until I get the GoogleTokenResponse object, which has the access token but not ...
PapelPincel's user avatar
  • 4,255
2 votes
6 answers
30k views

Error: invalid_client with Google Apps API OAuth2

I am using Google Apps API for my application with OAuth2. ,but I get an error. Error: invalid_client no support email Request Details That’s all we know.
user3655256's user avatar
61 votes
5 answers
26k views

What is "We’ve detected that your app is using an old version of the Google Play developer API" warning in Google Developer Console?

We do not use any Google Play Developer APIs explicitly, yet we are receiving the following warning: Is this related to https://developer.android.com/google/play/billing/...
Cheok Yan Cheng's user avatar
27 votes
4 answers
44k views

Unable to refresh access token : response is "unauthorized_client"

I am getting an error when I try to refresh access token: 400 Bad Request {error : "unauthorized_client"} From the Google token URI: { "error" : "invalid_request" } I read this answer ...
Martin V.'s user avatar
  • 3,560
9 votes
2 answers
8k views

OAuth Google API for Java unable to impersonate user

I would like to impersonate a user and add files to the users Google Drive on their behalf from a server process. I've setup a service account and can successfully access the Drive as the service ...
David's user avatar
  • 699
9 votes
1 answer
13k views

How do I request paginated BigQuery query results using pageTokens with the Google Client lib for Java?

I want to run BigQuery queries with thousands of rows of total results, but I only want to retrieve a page of 100 results at a time (using the maxResults and pageToken parameters). The BigQuery API ...
Michael Manoochehri's user avatar
7 votes
1 answer
2k views

Gmail atom feed with 2-legged OAuth receive 401 error

We are experiencing the issue of Gmail atom feed with 2-legged OAuth, an error message is "401 unauthorized". The error message is like below. <HTML> <HEAD> <TITLE>Unauthorized</...
user3762739's user avatar
7 votes
1 answer
15k views

Invalid grant when accessing Google API

I'm trying to invoke any of the Google API using "Service account" authorization access. I have downloaded ".pk2" file and activated "URL Shortener API" in Services tab of Google API console. Whenever ...
user12384512's user avatar
  • 3,362
7 votes
2 answers
5k views

Google Calendar API OAuth2 Troubles on Android Honeycomb

I am working on an Android Honeycomb (v3.0) application that has a requirement of communicating with the Google Calendar API. I would like to allow my application to access a particular Google account'...
BVB's user avatar
  • 5,380
5 votes
1 answer
8k views

Java Google Contacts API Access Service Account Authentication

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). ...
binzram's user avatar
  • 540
4 votes
2 answers
8k views

Using Google Cloud Storage JSON api in android

I want to upload image on Google Cloud Storage from my android app. For that I searched and found that GCS JSON Api provides this feature. I did a lot of research for Android sample which demonstrates ...
Zankhna's user avatar
  • 4,570
3 votes
1 answer
797 views

How to access google developer api in android app

I am trying to develop an app which needs to access google developer API by using developer email.I have gone through official documentation.I don't understand much.I created client id by following ...
lavanya velu's user avatar
2 votes
2 answers
2k views

using youtube data in android project

My target is to use youtube instead of server, to store videos. I need youtube provide the following function 1. upload video and get his url . 2. search for video that match developer tag. to do ...
idan's user avatar
  • 1,538
2 votes
1 answer
757 views

Error consuming customerLicense App Marketplace with Service Account OAuth2

SOLUTION I figured out how to solve this problem. First of all here is my implementation with Service Account: // Build service account credential. GoogleCredential credential = new ...
jproyo's user avatar
  • 51
2 votes
2 answers
4k views

authorize google calendar api works on personal account but not on google domain account

I need to make a Java application that stores calendar events in employees within a Google Domain. I created the application based on a sample I found on http://code.google.com/p/google-api-java-...
Stephan Celis's user avatar
2 votes
1 answer
533 views

Google Java API conflicted with ColdFusion CFHTTP?

I tried copying all those JAR's found in the google-api-client-assembly-1.20.0-1.20.01.zip (downloaded from https://developers.google.com/api-client-library/java/google-api-java-client/download) to {...
Henry's user avatar
  • 32.7k
1 vote
2 answers
5k views

Invalid credentials: Google API calendar

I am new to using Google APIs. I followed steps to setup Google Calendar sample code in eclipse using Google client library. I deployed the code to app engine using the cmd command- mvn appengine:...
Geet Parekh's user avatar
1 vote
1 answer
2k views

Setting up Google-api-java-client developing environment

I am trying the official example calendar-v2-atom-android. I have already import all dependency by using maven and it compile successfully. However, in run time , no class def found error occurs when ...
Bear's user avatar
  • 5,138
26 votes
4 answers
50k views

Google Auth API Javascript idpiframe initialization error on Chrome

I use GSuite and I'm coding a very simple web app to use Google Auth API, and I get an exception "idpiframe_initialization_failed". Now I have the exact HTML as shown in the google Sample: https://...
David Pascual's user avatar
25 votes
2 answers
6k views

javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake while inserting rows in bigquery

Hi I am working on android app in which I have integrated bigquery. I see sometimes we are getting a lot of SSL exceptions while inserting data to big query tables. I don't know how to handle this . ...
N Sharma's user avatar
  • 33.5k
19 votes
6 answers
39k views

"Login Required" 401 Unauthorized message when calling the v3 Google Calendar API using a Service Account via OAuth 2.0

First, let me explain what I am trying to do, as this is a two part question. I am building a JAX-RS service that internally authenticates with a Google account via OAuth2, so it can access and ...
Justin Phillips's user avatar
14 votes
2 answers
15k views

java.net.UnknownHostException Unable to resolve host "accounts.google.com": No address associated with hostname while inserting rows in bigquery

Hi I am working on android app in which I have integrated BigQuery. I see we are getting a lot of exception sometimes while inserting records in BigQuery tables. We are not expertise in this but ...
N Sharma's user avatar
  • 33.5k
12 votes
2 answers
9k views

Stored Credential from Google API to be reused using Java

I have successfully authorized my desktop application. It stores a file called StoredCredential. In order to not have to keep doing the copy URL into browser, accept, etc., steps every time I run the ...
Killerpixler's user avatar
  • 4,200
11 votes
4 answers
5k views

Cancel Google Drive upload possible?

I have written an app using the official API to upload to Google drive, this works perfectly. However I can't find anyway to cancel an upload. I'm running it in an ASyncTask, so far I have tried ...
crazyfool's user avatar
  • 1,433
7 votes
5 answers
10k views

java.lang.NoSuchMethodError: com.google.api.client.http.HttpTransport.isMtls()Z

I have an application I deploy on appengine using java8. Lately when I tried deploying I get this error on run time: Uncaught exception from servlet java.lang.NoSuchMethodError: com.google.api.client....
dina's user avatar
  • 4,081
7 votes
2 answers
1k views

Thumbnail 404 error

I'm trying to get the thumbnail of a file but am getting an error 404, the url that return drive is like this in some files https://docs.google.com/feeds/vt?gd=true&id=...
Alexander's user avatar
  • 261
6 votes
1 answer
7k views

google-api-java-client NetHttpTransport causes NoClassDefFoundError

I just started studying google-api-java-client on Android. Added next 3 libraries into project. (I don't use Maven.) google-api-client-1.4.1-beta.jar google-api-client-googleapis-1.4.1-beta.jar ...
Tomcat's user avatar
  • 1,405
5 votes
2 answers
11k views

How to get user profile on Google API using the JAVA library?

I have a Java ClientRequest to the Google API that returns a JSON containing the profile based on an access_token. The URL is: https://www.googleapis.com/oauth2/v1/userinfo?access_token=ya29.1....
augustocosta's user avatar
4 votes
2 answers
2k views

Setting uploadType in Google Drive Java API

I'm having the same problem as this and this but in the Java domain. This question also covers what I want but since no answers have been forthcoming I thought I'd ask it here, with a little more ...
davidf2281's user avatar
  • 1,319
4 votes
1 answer
4k views

Get Google Calendar Events Start and End Times with google-java-api-client in Android

How would one go about parsing the start and end times of events in a users Google Calendar using the google-api-java-client? After installing this sample android project from Google code, I can get ...
dell116's user avatar
  • 5,835
3 votes
1 answer
3k views

Using Google API Java Client on Android, a POST request does not seem to authenticate with Google App Engine app using OAuth

I have an Android client that needs to authenticate with a python Google App Engine app using OAuth. I followed this article. And was able to successfully do so using an HTTP Get Request. The ...
Shiprack's user avatar
  • 1,105
3 votes
1 answer
857 views

drive.changes().watch returns GoogleJsonResponseException: 401 Unauthorized without any message

I'm trying to watch for changes in Google Drive, and getting 401 Exception. Searching here, i found that people have detailed messages, why they are not unauthorized though i have nothing. Here the ...
Saandji's user avatar
  • 438