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
0
votes
1 answer

Automated client secret

I want to implement the Google calendar in my application. So as a developer I go to the console download my secret.json and can now access the data. But as a customer you don't have to deal with all of that you just see the OAuth Screen and then…
Tom Riddle
  • 58
  • 1
  • 8
0
votes
2 answers

Google OAuth2.0 + Lambda + S3 Authorization - How to refer to a file from S3?

I am attempting to use the authentication from google, however I have doubts on how I can use in the method: GoogleCredential credential = GoogleCredential.fromStream(new FileInputStream("MyProject-1234.json")) …
0
votes
1 answer

Google OAUTH: java.lang.NoClassDefFoundError: javax/net/ssl/HttpsURLConnection

I'm trying to use the goolge-oauth2 library, and when i call the refresh token method on the class I have this error: Caused by: java.lang.NoClassDefFoundError: javax/net/ssl/HttpsURLConnection at…
0
votes
0 answers

Google-oauth-java-client: Credential store is empty after saving new credential

This is how I create my GoogleAuthorizationCodeFlow ClassLoader classLoader = getClass().getClassLoader(); File file = new File(classLoader.getResource("credentials.oauth-credentials").getFile()); return new…
0
votes
1 answer

implement remote oauth server and exchange token with client without save token on server

I'm developing a small Java application to access the chat of my yt live streams. Other than twitch yt doesn't have an irc server to access the chat so I'm forced to use the yt API. Basically I plan to only use it by myself, but I maybe will offer…
cryptearth
  • 108
  • 8
0
votes
1 answer

OAuth2 and Google API: about access token expired time

I have a access token which I call it A, and a refresh token. so when I use the refresh token to refresh A, get a new access token which I call it B. I have some questions: 1.older access token (A) is valid ? can I use it to request GOOGLE api? 2.if…
Cyan
  • 1
0
votes
1 answer

Not able to access Google REST Api using Service Account

I need to access Google's BigQuery REST Api Endpoints with Service Account using Http client library. So, I tried the code provided in the article Using OAuth 2.0 for Server to Server Applications It gives me the compilation error in the below…
0
votes
1 answer

Gmail Oauth2 required accesstoken and refreshtoken using java

I want to create a java application which automatically send email, so i am using Ouath2, first I am trying to get accesstoken and refreshtoken with my clidet id and secret id but i am not able to get access token please suggest me on this. to get…
0
votes
1 answer

Google OAuth Access tokens for different APIs

I'm trying to access Reports API. And created source code for this on Java (GitHub project). I can get Access Token, but if I use it for Reports API Google always return me "Access denied. You are not authorized to read activity records" error. I…
Alex
  • 63
  • 1
  • 9
0
votes
1 answer

Problems while getting Google oAuth2 access token - Redirect Uri Mismatch

I am trying to fetch google contacts for a user via oAuth2 mechanism. I am following this tutorial - https://developers.google.com/identity/sign-in/web/server-side-flow I have javascript code that calls start() on pageload - function start() { …
0
votes
1 answer

Accessing AzureAD API using google OAuth2 client library for java

My project requires integration with G-Suite and AzureAD directory. Both of them supports OAuth2 as explained here and here. I want to access G-Suite and AzueAD API with Google OAuth2 client. I have few questions for the same Is it possible to…
0
votes
1 answer

gsuite log in vs Google + login

I am trying to provide google sign in for my users. I am confused here between the Gsuite log in and the google plus log in. I tried to google it and know the difference but cant find any related blog which explains the difference between google+…
0
votes
1 answer

New session created due to the optional www in the url

Crux: https://www.example.com vs https://example.com Background: Have a spring-boot application behind a webserver (nginx on https).Have setup Custom resource records with @ and www pointing to the same server in DNS setup. Have oauth2 setup…
0
votes
1 answer

Authentication to upload files in my drive using Google drive API client library for Java

I have spring+maven based java application having rest web service. For each call to this rest webservice, I want my application to upload a file to my google drive account. I found this. How can I authentication account before uploading in my…
0
votes
1 answer

How to auto post on google+ brand page?

I am using below codes but code are not working. I wants to update my website post on google+ brand page. how to i update post on brand page and also fix below code? Give me solution or example code. I need it very much. I have to make it. Help me…