All Questions
Tagged with google-api-java-client google-oauth
158 questions
0
votes
0
answers
27
views
Google Oauth refresh token without redirect url ? Just auto refresh
Just some context - Im creating app to merge my family calendars from different sources. I want to setup some google component but I have a problem. My code is pretty straight forward. First enter is:
...
1
vote
0
answers
50
views
I have a question regarding Google Calendar API logic
I'm testing Google Calendar authentication-related logic in Java. I'm not sure if I'm misunderstanding the concept, but I've been unable to resolve the issue for several days now.
My code is as ...
0
votes
1
answer
156
views
Google Drive credential returns 403 insufficientPermissions
I'm trying to get a list of files' data from Drive.
Following the google's example didn't work.
This is an example of my code:
private static final JsonFactory JSON_FACTORY = GsonFactory....
1
vote
1
answer
406
views
How can I set up a Google OAuth2 client using https scheme in Java using?
I am writing an application that uses the Spreadsheets API. Because I am using the write scope, which is sensitive, the OAuth2 redirect URI must use https instead of http (except when using localhost)....
0
votes
1
answer
199
views
401 Unauthorized to sqladmin.googleapis when using Spring Cloud to create ephemeral certificate for GCP Cloud SQL
I am connecting a Springboot application on my local computer to GCP Cloud SQL, using Spring cloud dependency com.google.cloud:spring-cloud-gcp-starter-sql-postgresql:4.8.2
The dependency is trying to ...
0
votes
1
answer
138
views
Integrating Google calendar to a jsf web App
Our web application, developed in JSF, allows its users to schedule meetings in their calendar.
The goal is that in the application settings, each user can integrate their Google account, so that the ...
2
votes
1
answer
1k
views
google-calendar-api with java spring boot
I am developing a java Springboot web application. In Which I have multiple users that login with a adress mail and a password. The login is Ok.
@Override
protected void configure(HttpSecurity http) ...
0
votes
1
answer
65
views
Do I have to Google Sign everytime to upload a Video to Youtbe using Java?
public static Credential authorize(final NetHttpTransport httpTransport) throws IOException {
InputStream in = new FileInputStream(CLIENT_SECRETS);
GoogleClientSecrets clientSecrets =
...
1
vote
0
answers
945
views
Why am I getting an "unknown error" after signing in with Google OAuth 2.0 and Java
I am using the Java Client Library to handle Google authentication for my app. Below is the code to handle the authentiation. It is almost exactly the same as the code featured on the Java quickstart, ...
2
votes
2
answers
778
views
How to integrate Google Calendar client with GoogleCredentials in Java
Hi I am trying to use Google Calendar client with GoogleCredentials but not able to find any docs on how to make this work. Please add a doc or let me know how to make it work.
package com.example;
...
0
votes
1
answer
779
views
Google authorization as a Service Account (Java)
I'm trying to get authorization through a Service Account to Google Sheets (No confirmation window). I can't find any information about it. If I use the method from https://developers.google.com/...
1
vote
1
answer
807
views
When my application is trying to access Google Drive API, I am getting com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
This my application worked successfully before. The issues appeared despite I did not change any application code. Neither I did any changes in the drive api console.
Currently it is being ...
1
vote
2
answers
432
views
Reading labels works but reading messages results in ACCESS_TOKEN_SCOPE_INSUFFICIENT
I have created one poc using Gmail API which read all email and print on console. I have take refrence from Gmail api Java quickstart.
I have follows all the steps like create project, Gmail API ...
1
vote
1
answer
3k
views
Gmail Send request results in "insufficient authentication scopes" error
I try to send mail use Gmail API. My code almost the same like in google tutorial, but when I invoice this send Message method I get error Request had insufficient authentication scopes.
This is full ...
0
votes
0
answers
678
views
Programmatically sign in to google account using google workspace domain
We are trying to implement the user authentication/authorization using google as IDP. The requirement is user lands on our web app login page and type their google account emial/ password. We will ...
0
votes
1
answer
1k
views
How to Get User Profile details by using accesstoken (tokenId)?
I tried to get the profile details of the google user, I already got an access token by using the refresh token now I want to get the details of the user.
I have no idea what I have to pass in the ...
0
votes
1
answer
2k
views
Migrate to GoogleCredentials from GoogleCredential
Currently, I am using the following implementation but the code says GoogleCredential is deprecated.
GoogleCredential credential = new GoogleCredential.Builder()
.setClientSecrets(...
0
votes
0
answers
82
views
Cannot access files under resource directory in a jar
Basically working on a spring project that is trying to leverage google api. To do so I need to access the StoredCredentials file, which is follows this path:
src/main/resources/[email protected]/drive-...
1
vote
0
answers
183
views
How can I use my retrieved access_token with the Googles Credential Builder instead of a service account
I am using the Google Drive API V2 with the Java Library in ColdFusion. It is from this project (which is old) https://github.com/PCommons/cf-google-drive.
The code is written to work with a service ...
1
vote
1
answer
381
views
Gmail Oauth2 Access with intranet web server
Does anyone know the correct setup for the cloud project and redirect URL within the application for the following case?
Setup:
Spring + Apache Wicket
The application is installed on a server (...
4
votes
2
answers
1k
views
How do I open GoogleSheets Service with a Stored Refresh Token using Java API v4
I am working on an application (Apache Drill) and looking to build a connector to Google Sheets using the Google's Java API (v4).
I have this working, however, I would like to store the refresh token ...
1
vote
1
answer
2k
views
How does one get the id_token using Google's OAuth2 Java Api?
I'm trying to get my head around the OAuth2 Java library that Google provides.
I have everything I need to make the request to Google's token endpoint manually using Springs built-in WebClient. ...
1
vote
0
answers
156
views
How do I open a Google Sheets Service using StoredCredentials?
I am working on an application (in Java) which will pull data from GoogleSheets. I am looking to retain the credentials in using Google's StoredCredentials object, however while I have figured out how ...
1
vote
1
answer
935
views
Can't transfer ownership of google drive txt files using gmail account and java API
I am developing a multi user java web application which lets users list/share their google drive files between gmail accounts. I utilize oauth2 authorization code flow where user accessing my app, ...
1
vote
1
answer
433
views
Transfer google drive file ownership using google java api
I have uploaded some test files to my google drive using their website and my gmail account ([email protected]). The files are in "My Drive" and not shared drive. I am then trying to write a ...
1
vote
1
answer
439
views
Locally works, fails on server : Google calendar API
In an existing Java based spring boot application, I have integrated Google calendar API. In my local, it works. On dev server, I see that the URL to open in browser is :
https://accounts.google.com/o/...
2
votes
1
answer
2k
views
"Please open the following address in your browser..." issue with google sheets api and spring boot
I want to add functionality for reading google sheet in my spring boot project. I have followed guides from https://www.baeldung.com/google-sheets-java-client and https://developers.google.com/sheets/...
1
vote
2
answers
888
views
GoogleMail: Refresh Access Token with OAuth 2.0
I have below method to get Google Mail credential. However Access Token is short lived and expire after 24 hours. How to refresh it?
My method:
private static Credential getCredentials(final ...
0
votes
1
answer
427
views
Cancel google OAuth2 authorization
I am creating a java desktop app that needs access to Google APIs.
I authorize the application like this:
Details credentialDetails=...;
List<String> scopes=...;
GoogleClientSecrets ...
2
votes
0
answers
540
views
GoogleCredential deprecated
Trying to get Gmail service and it should up the message 'com.google.api.client.googleapis.auth.oauth2.GoogleCredential' is deprecated.
Here is my code snippet.
import com.google.api.client.auth....
1
vote
1
answer
931
views
Google API oauth invalid_grant
I have a refresh token issue in my app and i can not figuring out how to solve it. I've seen various posts about it but i still need some help. The authorization code i'm using is basically the Quick ...
0
votes
0
answers
374
views
error in OAUTH2 Credential when inserting an event in Calendar API: OAuth2Credentials instance does not support refreshing the access token
I am a student and fairly new with the handling of APIs and I am trying to use the google calendar API to insert events in a calendar from the backend of a web application with SpringBoot, after ...
2
votes
1
answer
147
views
Do I have to use the default google API authentication in a Java client application accessing a public sheet?
I'm creating a open source Java client application and I don't want to get data from a public read, only google sheet.
The users don't have to verify/login so I was wondering if there would be a way ...
3
votes
1
answer
369
views
Is there some way to include multiple Google API services (e.g. Sheets and Docs) for a single Java project?
I'm using Google's API services for the first time for a personal Java project involving reading data from a Google Sheet and writing information relating to it to a separate Google Doc.
I've used ...
2
votes
1
answer
931
views
My app can not create file in "appDataFolder" of google drive
How can I create a file in google drive "appDataFolder"?
I created google developer console settings which is necessary for creating file and accessing "appDataFolder".
google ...
1
vote
1
answer
539
views
Read time out issue with Google Drive
I am using Drive SDK v3 to upload/download from drive. The authorization is web page based (OAuth2) and not API key where user will authenticate their google account and grant required permission. ...
1
vote
1
answer
740
views
Can I make Gmail API calls without user interactions?
Currently I need to use the Gmail API to check the labels of newly arrived emails. It was perfect on my laptop, that I need to manually authorize for the first time starting the program(Java), and ...
1
vote
1
answer
849
views
Java Google API authentication - Is there any way to omit step where app asks for visiting the URL
In my Spring application I'm using following implementation of Google Authorization:
public Credential authenticate(final NetHttpTransport httpTransport) throws IOException {
Optional<...
0
votes
1
answer
406
views
Invalid grant when authenticating to Google
I'm trying to connect to the Google Calendar API. I am have followed the step in Google calendar quick start for Java
{ "error" : "invalid_grant", "error_description" : ...
1
vote
2
answers
398
views
Web application deployed not generating authorization tokens
I'm trying send using gmail api with oauth2 credentials like below
private Credential getCredentials(NetHttpTransport httpTransport) throws IOException {
// Load client secrets.
try {
...
1
vote
1
answer
489
views
Google Calendar API Java 400 invalid_request
@Component
public class GoogleCalendarSyncListener implements ApplicationListener<CourseLessonGoogleCalendarNeedToBeUpdatedEvent> {
private String getEventId(Lesson parameter) { // ...
0
votes
1
answer
262
views
Oauth 2.0 Authentication using google-api-services-oauth2
I ran the code from below url. This is used for oauth2.o authentication
OAuth2Sample.java
I am trying to authenticate, but instead of google as auth server, i want to use okta or any corporate auth ...
3
votes
1
answer
3k
views
GoogleCredential deprecation
We want to implement Google OAUTH to play nicely with our web-app based credentials. Flow starts on UI side, which shows user consent screen, and then we obtain a code. That code is then sent to our ...
0
votes
1
answer
650
views
Invalid JWT Signature requesting OAUTH from Google using Java
I am trying to follow the directions here for constructing a proper JWT request to throw at Google to get a temporary oauth token, so I can query the Google Sheets API. I realize that there is a Java ...
0
votes
1
answer
589
views
Youtube Data API- HTTP/1.1 401 Unauthorized
When I want to use the YouTube Data API to upload a video, it thrown the exceoption 401, however my Credential
have the scope of
upload("`https://www.googleapis.com/auth/youtube.upload`").
I have ...
8
votes
1
answer
485
views
Can I get authorization for Youtube's Reporting API from a non UI application?
I want to run an application (on AWS Lambda) periodically that fetches reports using Youtube's reporting API and stores the reports in a database. I'm the owner of the Youtube channel.
However, I'm ...
2
votes
0
answers
903
views
Recieving 401 Unauthorized when trying to refresh Google Access token
Hi so I'm implementing a Java Gmail API on a web server, and when try refresh the access token using a refresh token I have stored on the db I get the following error:
Exception in thread "main" com....
0
votes
1
answer
952
views
Unable to authorize using Google api client to access Hangout chat api
I am using google.api.client version 1.30.9 . I want to authenticate my requests using Hangout Chat Api before sending . In the official doc https://developers.google.com/api-client-library/java/...
2
votes
2
answers
1k
views
Google Drive API giving Insufficient Permission for uploading a file
I'm trying to upload a image to google drive but it is returning 'Insufficient Permission: Request had insufficient authentication scopes.' I tried changing the scopes to DriveScopes.DRIVE_FILE, ...
0
votes
0
answers
488
views
Google Photos REST API with Angular/Java/dotNet
I am trying to connect to google photo in angular and been searching since last two days about google photos REST api but couldn't find any useful example.
Could somebody help me with this on how to ...