Questions tagged [google-oauth-java-client]

For questions about the use of the Google OAuth Client Library for Java.

The Google OAuth Client Library for Java provides Java classes and methods for both OAuth 1.0a and OAuth 2.0.

This library allows a Java application to gain permission from a user to access the personal data they store with an OAuth provider such as Twitter, Facebook, Instagram, and many others. The user is directed by the OAuth library to the provider site and must confirm to the provider that they are happy for the requested information to be shared. If permission is granted then an access token is made available to the OAuth library and requests for the granted information can be made successfully.

See for more information about the OAuth standards.

This tag should be used for questions about writing Java software which uses the Google OAuth Client Library for Java, for either OAuth 1.0a or OAuth 2.0.

143 questions
1
vote
1 answer

How to authenticate a service account without download for the Google Cloud Java SDK (not on App Engine)

I am trying to create a service account key programmatically in Java with the Google Cloud SDK, for an application not running on App/Compute engine. This question is similar to mine, but it is running on App engine, so I cannot use the same code as…
1
vote
0 answers

How to Store Google oAuth Credential in Database using gclient-java library?

I am using glcient-java library to handle Google oAuth Flow.As recommended in docs, i have two classes extending AbstractAuthorizationCodeServlet and AbstractAuthorizationCodeCallbackServlet respectively. The flow is going smooth. I am now trying to…
zee
  • 502
  • 8
  • 28
1
vote
1 answer

Implementing SSO using OpenID Connect and usage of tokens

Scenario - Legacy application(s) which needs to be authenticated using OpenID connect. We are using keycloak as the IP. All, I really need is a single authentication mechanism for multiple applications. After authenticating, I also need is the…
1
vote
1 answer

What is the API for getting accounts on which user has admin access (with OAuthV2 access given)?

I've done OAuthV2 from user for adwords management, now I want to manage client's account and for that I want only those accounts on which user has admin access. Can you please help me how can i get those accounts OR at least how can i check whether…
Vivek
  • 1,465
  • 14
  • 29
1
vote
0 answers

YOUTUBE DATA API - 'TokenResponseException: 401 unauthorized' when trying to refresh access token

Currently I`m working on a multi client youtube service that receives my playlists. I used the FileDataStoreFactory to store necessary credentials for every client. My problem is that I can only successfully access the youtube api for the first…
1
vote
2 answers

Using Java and OAuth 2.0 to Connect to Google Contacts

I am having issues connecting to the Google Contacts API with Java using OAuth 2.0. After extensive searching, I have reached the point where it appears I can connect, but receive error messages in the final process. I have done the following: 1)…
Terry
  • 169
  • 5
  • 18
1
vote
1 answer

Connection Reset on Google OAuth Credential.refreshToken

I am attempting to create a credential using a service account (in order to retrieve Google Analytics info). But when Credential.refreshToken(..) is called, I get a java.net.SocketException: Connection reset. I have created an OAuth service account…
Edmund Johnson
  • 709
  • 8
  • 15
1
vote
1 answer

Impersonating user using Google service account fails (JAVA client)

When i try to impersonate a user in Google Apps Domain to authenticate Google Drive API using setServiceAccountUser() i get a response as com.google.api.client.auth.oauth2.TokenResponseException: 403 OK { "error" : "access_denied", …
1
vote
0 answers

Why Google Drive SDK allows six partial file download requests only?

I want to read files on Google Drive partially (Range request or Partial download). Moreover, I want to do it in series - to read next interval just only after previous interval has been read (with CountDownLatch) and in a separate thread (Android…
isabsent
  • 3,683
  • 3
  • 25
  • 46
1
vote
2 answers

Oauth 2.0 exchange authorization code for token : Invalid scheme for redirect uri

i'm trying to exchange a received authorization code wth a token in a web application but when I call GoogleAuthorizationCodeTokenRequest i get this error : "Invalid parameter value for redirect_uri: Invalid…
1
vote
3 answers

404 Error while accessing https://www.googleapis.com/oauth2/v1/certs

UPDATE : As of 29.10.204 5:00 PM EST the services seems to be working fine We are trying to do authToken authentication and all the request are failing with 404 error. This started happening since this morning (28-10-2014). This is happening from…
NullPointerException
  • 3,732
  • 5
  • 28
  • 62
1
vote
1 answer

Google OAuth useing Java Server Domain Restriction Using hd parameter is not working

I have implemented GOOGLE OAuth using JAVA Web Server. I can not able to figure out how to give domain restriction on sign in from example@example.com T https://developers.google.com/accounts/docs/OAuth2Login#hd-param Here is java server code.…
UtkarshBhavsar
  • 249
  • 3
  • 23
1
vote
1 answer

Can I pass query parameters to the callback redirect URL in google ouath calendar api project setting?

For the OAUTH setting for our google calendar project , the "REDIRECT URIS" is given as http://foo.com/calendar/callback It is possible that when this callback is called we need some extra information passed in the callback. For this what I planned…
Zenil
  • 1,491
  • 3
  • 12
  • 21
1
vote
0 answers

Creating new Credentials object from stored AccessToken and RefreshToken

I'm following the Implementing Server Side-Authentication part of the Google Drive SDK docs, and in the code presented the following part if left as an exercise for the reader: static Credential getStoredCredentials(String userId) { // TODO:…
1
vote
1 answer

Google OAuth 2.0 "Request for Permission" webpage does not close (FF, Chrome)

I am using Google OAuth 2.0 for authentication of an installed desktop Java application. I am using the Google OAuth 2.0 Java Client Library. When I make a call to request the user to authorize access to their Google Calendar, the “Request for…