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.
190
questions
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 ...
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 ...
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 ...
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 ...
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 ...
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("...
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 ...
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 ...
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 ...
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 ...
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....
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
...
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>...
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)?
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....
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 ...
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 ...
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 ...
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 ...
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.
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/...
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 ...
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 ...
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 ...
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</...
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 ...
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'...
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).
...
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 ...
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 ...
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 ...
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 ...
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-...
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 {...
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:...
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 ...
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://...
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 . ...
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 ...
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 ...
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 ...
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 ...
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....
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=...
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
...
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....
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 ...
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 ...
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 ...
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 ...