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

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". I have configured the client_id and client_secret in my…
1
vote
1 answer

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 packaged into a jar file (using maven) The…
aebange
  • 35
  • 5
1
vote
0 answers

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(clientSecrets) …
1
vote
1 answer

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 / code flow explaining how this library can be used…
1
vote
0 answers

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 request coming to the front end till video upload…
1
vote
1 answer

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.lambda.runtime.LambdaLogger import…
Thai Rodrigues
  • 301
  • 1
  • 3
  • 10
1
vote
1 answer

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 be specified by calling createScoped or passing…
1
vote
0 answers

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 credential to gain access to google sheet api to…
1
vote
0 answers

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 video on YouTube. The second one is web interface on…
artem
  • 16,382
  • 34
  • 113
  • 189
1
vote
1 answer

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.IllegalArgumentException: key scope at…
cryptearth
  • 108
  • 8
1
vote
0 answers

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 "Signed in with Google" when they are signed in. Is it…
1
vote
2 answers

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…
1
vote
0 answers

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 handleResponse(com.google.api.client.http.HttpRequest…
Néstor
  • 11
  • 2
1
vote
1 answer

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 order to authenticate (as in the samples that…
1
vote
1 answer

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 server to listen for the loopback response after…