google-api-java-client

Unable to refresh access token : response is “unauthorized_client”

流过昼夜 提交于 2019-11-30 08:34:03
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 here and the official Google documentation (which describes how a POST request should look) and I don't see any difference. I captured my POST request (secrets removed): POST /SHOWMERAWPOST HTTP/1.1 User-Agent: Google-HTTP-Java-Client/1.10.3-beta (gzip) Pragma: no-cache Host: requestb.in Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 175 Connection: keep-alive Cache-Control: no

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

两盒软妹~` 提交于 2019-11-30 06:50:31
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 started to learn this new technology. It would be great if you guys can help me on this. java.net.UnknownHostException: Unable to resolve host "accounts.google.com": No address associated with hostname at java.net.InetAddress.lookupHostByName(InetAddress.java:424) at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236) at java.net.InetAddress.getAllByName(InetAddress.java:214) at com.android

google-api-java-client NetHttpTransport causes NoClassDefFoundError

怎甘沉沦 提交于 2019-11-30 05:13:49
问题 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 google-api-client-googleapis-extensions-andr And picked sample code to work with. In the sample, it used GoogleTransport which seems not available now. HttpTransport transport = GoogleTransport.create(); So I changed it to NetHttpTransport(), found on the web. import com.google.api.client.http.javanet

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

老子叫甜甜 提交于 2019-11-30 04:49:04
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 manipulate a Google calendar. This service will be called by a web site (Joomla), which will allow users that login into the site to register their email address with calendar events so they can get email notifications when the events are near. These users have no knowledge of the underlying Google account. So my first question, is using Service Account authentication the right thing? Looking at the

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

老子叫甜甜 提交于 2019-11-30 00:17:50
问题 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 . Please help what exactly is the cause of this problem. Here is the same thread but no answer Bigquery SSL error while doing streaming insert api call javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java

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

那年仲夏 提交于 2019-11-29 22:30:55
问题 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 into my Google calendar and parse some information, (like all the calendars, the event names, when it was published, and the summary), but I cannot for the life of me get the event start and end times. My understanding of the code is as such. Inside the main activity class (CalendarAndroidSample

Getting null Refresh token

时光怂恿深爱的人放手 提交于 2019-11-29 16:05:07
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 refresh token. To build the request url I user the following method : ... googleAuthenticationUrl = new GoogleAuthorizationCodeRequestUrl(CLIENT_ID, callBackUrl, scopes).build(); ... When getting the request token I exchange it with an access token in this line : ... GoogleTokenResponse tokenResponse = new GoogleAuthorizationCodeTokenRequest(new NetHttpTransport(), new JacksonFactory(), CLIENT_ID,

Google Java API conflicted with ColdFusion CFHTTP?

佐手、 提交于 2019-11-29 15:54:28
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 {cf_root}/lib , restart ColdFusion, and everything loaded up fine. However, when I used <cfhttp> : org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [CfmServlet] in context with path [/] threw exception [org.apache.http.impl.client.DefaultHttpClient.setRedirectStrategy(Lorg/apache/http/client/RedirectStrategy;)V] with root cause java.lang.NoSuchMethodError:

Java Google Contacts API Access Service Account Authentication

放肆的年华 提交于 2019-11-29 14:52:30
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 using the public-key as accesstoken ... Instead I tried over a service account : private static final String USER_ACCOUNT_EMAIL = "xy@gmail.com"; private static final String SERVICE_ACCOUNT_EMAIL = "xy

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

萝らか妹 提交于 2019-11-29 12:38:40
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-client/wiki/APIs#Calendar_API Now I wanted to make it work on an account from the google domain and suddenly I'm stuck. I changed the client_secrets.json file with a new one. generated on code.google.com/apis/console for an installed application and now I get a invalid client error: ex = (com.google.api.client.auth.oauth2.TokenResponseException) com.google.api.client.auth.oauth2.TokenResponseException: