Questions tagged [google-oauth-java-client]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
83 views

Kotlin Multiplatform Desktop execute with run but fail on runDistributable

I created an application with Kotlin Multiplatform, for desktop (only). The application works great when I do ./gradlew run but fails when I do ./gradlew runDistributable giving: Exception in thread &...
zambotn's user avatar
  • 735
1 vote
1 answer
354 views

Spring Boot OAuth2 authentication with Google failing due to missing client_secret

I'm trying to implement OAuth2 authentication with Google in my Spring Boot Angular application, but I'm getting an "invalid_request" error with the message "client_secret is missing&...
Ciro Dolce's user avatar
1 vote
1 answer
210 views

How to get an absolute path to a resource inside the springboot resources folder?

I have a folder located inside of a resources folder in a Java springboot project... I am attempting to get the filepath of this file both when running the code locally, AND when the project has been ...
aebange's user avatar
  • 35
0 votes
0 answers
18 views

Google OAUth client Jakarta EE 9 compatible release

I am using google oauth client and spring boot in one of my projects. Our team want to upgrade spring boot to 3. Since our project is using google oauth client and google big query client, I am ...
Shah din Sani's user avatar
6 votes
1 answer
587 views

Google OAuth consent screen mentions data that my app did not request

My webapp uses "Sign In with Google for Web" (https://accounts.google.com/gsi/client script). For various reasons, I now want to get rid of the JS library and implement the required steps ...
Jens Bannmann's user avatar
0 votes
1 answer
563 views

Error while using the google sheets api with spring boot [duplicate]

I'm trying to extract my Google Sheet information from my Spring Boot application, but I got the error Exception in thread "main" java.lang.NoSuchMethodError: 'long com.google.common.io....
user avatar
0 votes
1 answer
939 views

Google OAuth2 Java API set state in callback/redirect URI

I would like to set the state parameter in my Redirect URI as described in https://developers.google.com/identity/protocols/oauth2/web-server#redirecting https://accounts.google.com/o/oauth2/v2/auth? ...
Edward's user avatar
  • 580
3 votes
0 answers
776 views

How to implement a custom DataStoreFactory for use with Google APIs using OAuth2?

I'm trying to implement a custom DataStoreFactory as mentioned in the docs here so that I can authenticate with Google APIs and store my access/refresh tokens in my database, but I can't find any ...
RTF's user avatar
  • 6,224
1 vote
0 answers
285 views

Using the google-auth-library-java to get a new access token from client secret and refresh token

Currently, I am using the following code snippet to use as a credential for accessing the Gmail API on Java / Kotlin. val credentials = GoogleCredential.Builder() .setClientSecrets(...
Raymond Feng's user avatar
0 votes
1 answer
330 views

Google Oauth2 Server side flow java with Refresh token

I am trying to fetch some data from GoogleAnalytics through a java application running inside a VM. I have a refresh token ready with me available and I want to use this refresh token to generate an ...
Sriram R's user avatar
  • 2,137
0 votes
1 answer
796 views

How to set a custom RedirectUri in com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver

I'm developing a java application that integrates with google API (google sheets API) I'm trying to follow an example provided in google developers website. Link: https://developers.google.com/sheets/...
Dani's user avatar
  • 1
0 votes
0 answers
226 views

How Google OAuth Client library refreshes access token using refresh token?

So I have been working on Google's OAuth client library for integrating my application with another web service. Type of access is offline. So, I have both the access token and refresh token as a ...
Foo's user avatar
  • 31
1 vote
1 answer
129 views

Google OAuth Client Library for MS Graph authentication

So I've been working on Google OAuth Client Library to integrate MS teams. I suppose that Google OAuth client library can be used for any OAuth Services on the web. But is there any documentation / ...
Foo's user avatar
  • 31
1 vote
0 answers
151 views

popup google oauth screen in browser when try try to access youtube data api

I am using front end react js and backend spring boot. When i try to upload video to youtube through youtube data api there need to oauth access. That url shows in spring boot console. Non of the ...
dilanka's user avatar
  • 31
0 votes
1 answer
84 views

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 ...
Tom Riddle's user avatar
1 vote
1 answer
446 views

Token from Google Credentials Service Account NULL

I am attempting to retrieve the credentials for my Google service account with the following code: package function import com.amazonaws.services.lambda.runtime.Context import com.amazonaws.services....
Thai Rodrigues's user avatar
0 votes
2 answers
306 views

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("...
Thai Rodrigues's user avatar
2 votes
0 answers
502 views

GoogleIdTokenVerifier.verify always returns null

I am trying to validate a JWT Token sent by Google to my application . I am using the below code to validate the JWT token but verifier.verify(token) always returns null even if the token is valid. I ...
vignesh d's user avatar
  • 265
2 votes
1 answer
259 views

What is the relationship between AbstractAuthorizationCodeServlet and AbstractAuthorizationCodeCallbackServlet?

I'm trying to understand this example project which uses Google's OAuth library to let users login with their Google account. Specifically, I'm trying to understand the relationship between ...
Kevin Workman's user avatar
1 vote
1 answer
1k views

Error getting access token from GoogleCredential

I am trying to get an access token to use the Cloud SQL Admin API to export a table as CSV to google cloud storage. I keep getting this error: Scopes not configured for service account. Scoped should ...
Valkyrie's user avatar
  • 189
1 vote
0 answers
390 views

Google API Refresh Token and Access Token Questions (Java BE + Web App)

I want to do something very similar to this tutorial, in which I'm getting the authCode from web client and sending that authCode to a Java BE app to get credentials of an user and then, using the ...
PBandJ's user avatar
  • 2,577
0 votes
1 answer
389 views

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 ...
Pier Luigi's user avatar
0 votes
0 answers
155 views

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")...
Michael Jackson's user avatar
1 vote
0 answers
283 views

Google OAuth in Java — how to set token data manually?

I have two servers. The first one is running a headless Kotlin/JVM program, and is not accessible for the "client", so it's not possible to authenticate on this server directly. It uploads given ...
artem's user avatar
  • 16.4k
1 vote
1 answer
98 views

google-oauth-java-client fails with twitch

basically cross from https://discuss.dev.twitch.tv/t/using-google-oauth-client-java-fails-to-execute-token-request/24191 the exception I get is this: Exception in thread "main" java.lang....
cryptearth's user avatar
0 votes
1 answer
311 views

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 ...
cryptearth's user avatar
1 vote
0 answers
349 views

How to Set Text of Google Signin Button and Where is the g-signin2 Class Data Attribute Documentation

I have Web App using Google OAuth working but would like to have the sign in button say "Sign in with Google" whether or not the user is actually signed into Google. By default the button says "...
glez's user avatar
  • 1,164
1 vote
2 answers
14k views

Code 403 : “The request is missing a valid API key.” PERMISSION_DENIED Service Account Key Google Cloud speech to text api in python"

I want to implement the Google Cloud speech to text using a service account. What i have try is i have set the environment variable to that json and send the post request to this url 'https://speech....
Kunfu Panda's user avatar
12 votes
7 answers
23k views

How to fix the "Malformed auth code" when trying to refreshToken on the second attempt?

I'm developping an Android App with Angular and Cordova plugins and I want to integrate it with Google Authentication. I have installed the cordova-plugin-googleplus and I have successfully ...
Ausiàs Armesto's user avatar
2 votes
2 answers
1k views

Cannot get access to Google Calendar API via Service Account

I'm trying to retrieve my own free/busy calendar via a simple POST call in Java, and I'm running into access errors. Basically I'm getting a 404, notFound error like so: { "kind": "calendar#...
John S's user avatar
  • 1,695
1 vote
0 answers
92 views

How to correctly extend Credential class and override methods that use its internal lock

I'm writing a client that uses the google-oauth-java-client. In my code, I need to extend the Credential (com.google.api.client.auth.oauth2.Credential) class and to override the method: boolean ...
Néstor's user avatar
  • 11
0 votes
1 answer
167 views

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 ...
Cyan's user avatar
  • 1
0 votes
1 answer
240 views

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 ...
Alex Andrew's user avatar
0 votes
1 answer
627 views

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 ...
VyTcdc's user avatar
  • 986
2 votes
0 answers
321 views

google oauth and refresh token confusion/questions

I had expected the refresh of an expired access token to happen during the authentication process instead of during an api access. I think I understand why this happens - authorization is done once ...
user1126515's user avatar
  • 1,133
1 vote
1 answer
2k views

Google OAuth 2.0 server side access to Google Drive

I have created a user with access to a specific google drive. Through a Spring Boot application (jhipster) I connect with this user to the G-Drive. My problem is the authentication. I use this code in ...
Investigator's user avatar
  • 1,441
2 votes
1 answer
1k views

Google login is stuck at oauth2/iframe

I have an Angular 6 + PWA app which consist of google login. I have integrated google login using angular-6-social-login. The app was working absolutely fine until the google pop stopped appearing....
Rahul Sharma's user avatar
0 votes
1 answer
447 views

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 ...
Alex's user avatar
  • 63
1 vote
1 answer
2k views

Unable to exchange OAuth auth code for access token

I'm just trying to make a simple app, but I can't even get past authenticating the user. I am using the Google OAuth Client Library for Java. These are the current steps I am taking: Start local web ...
Parker Jones's user avatar
0 votes
1 answer
1k views

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 ...
zookastos's user avatar
  • 917
0 votes
1 answer
253 views

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 ...
Amit Shrivastava's user avatar
0 votes
1 answer
156 views

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 ...
test Account's user avatar
8 votes
2 answers
11k views

Server side authorization with Google Play Developer API?

Authorization is required to fetch information from the Google Play Developer API. I know how to do this with Postman, but implementing authorization is much more cumbersome (redirect url, handling ...
Bevor's user avatar
  • 8,375
0 votes
1 answer
127 views

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 ...
Anand Rockzz's user avatar
  • 6,123
2 votes
1 answer
1k views

Difference between profile and email scope in Google OAuth 2 flow

I'm configuring the scopes that my application requires for accessing Google and I can't find the difference between those two: https://www.googleapis.com/auth/userinfo.email https://www.googleapis....
dvelopp's user avatar
  • 4,135
0 votes
1 answer
2k views

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 ...
rsnhah's user avatar
  • 349
0 votes
1 answer
326 views

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. ...
MasuD RaNa's user avatar
2 votes
1 answer
1k views

Sharing Google oAuth Tokens between Android, iOS and Web apps

We're building an application which accesses files in Google Drive. Our application has a web UI, an Android App and an iOS app. We use oAuth2 to let the user authorize our app to access their Google ...
Goog DriveUser's user avatar
0 votes
1 answer
140 views

Unable to consume JAVA sdk for Google classroom API's getting PERMISSION_DENIED Request had insufficient authentication scopes

I am trying to integrate google classroom in my java project Using OAuth 2.0 for Server to Server authentication, example is given here Official Google class room integration doc uses OAuth consent ...
Kashif ali's user avatar
0 votes
1 answer
198 views

Google Oauth not working after uploading to alpha testing

I'm using google sign-in in my app It's working fine when debugging but the login don't work after uploaded signed-apk for alpha testing on google play store. The error is status{statusCode=...
Ammar Atef's user avatar