All Questions
Tagged with google-api-java-client google-api
443 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:
...
0
votes
1
answer
64
views
How to Create 'Gmail' Service with GoogleCredentials
I have the following versions
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
...
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 ...
1
vote
0
answers
925
views
GA4 Data API - How to set multiple dimensions and metrics
I am trying to generate a report using the Data API of GA4. However, I could not manage to add multiple metrics or dimensions to my report builder.
This is how I try to achieve this functionality:
...
1
vote
1
answer
2k
views
You are not authorized to decode the requested integrity token while decoding play integrity token
I have followed all the steps outlined in https://developer.android.com/google/play/integrity/setup#integrate-into-app to add Play Integrity to my Android library. Configured the app using this ...
0
votes
1
answer
362
views
Google Play Integrity API: PKIX path building failed: ....SunCertPathBuilderException: unable to find valid certification path to requested target
I encounter this exception while trying to decode the Play Integrity token on the server side:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find ...
1
vote
0
answers
947
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
0
answers
142
views
com.google.api.client.googleapis.json.GoogleJsonResponseException: 500 Internal Server Error in Files list using query search
I am trying to query a list of root files and folders which are owned by me and along with items which are shared with me.
So I am using this query - ((not 'me' in owners and sharedWithMe) or 'root' ...
1
vote
2
answers
950
views
Error trying to create an instance of GoogleIdTokenVerifier using the Java Google Client Api
i'm trying to integrate the google login function on my website and i'm following the relative google doc for the server side token validation: https://developers.google.com/identity/gsi/web/guides/...
1
vote
2
answers
375
views
Google cloud dataflow restapi always returns 403-SERVICE_DISABLED
I have this dependency
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-dataflow</artifactId>
<version>v1b3-rev20221025-2....
0
votes
1
answer
534
views
Caused by: java.io.IOException: The Application Default Credentials are not available
I'm working on an android app that interfaces with a google sheet. I was following the api documentation for writing values to certain cells but I'm getting this error here:
Caused by: java.io....
1
vote
1
answer
257
views
Create a job on jobs google via api returns "The Application Default Credentials are not available" [closed]
I started to create an application for posting vacancies in jobs.google. I can not find an open api in order to post these vacancies directly on jobs.google through it.
Tell me how to do it.
I found a ...
0
votes
1
answer
780
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 ...
6
votes
3
answers
3k
views
Compatibility problems when using 2.0.0 google-api-client for Gmail calls
I've been working on a little project that connects to the user's Gmail inbox and reads the mails using google-api-client 2.0.0 and google-api-services-gmail version v1-rev20220404-2.0.0
When I try to ...
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
1
answer
405
views
Unable to upload file in specific folder in google drive using REST API
I am trying to upload a local file to a specified folder in Google Drive using REST API from android app, the file is uploading in the root directory but not uploading in the specified folder. No ...
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(...
1
vote
1
answer
1k
views
GMail API Server to Server Authentication
i am trying to implement a task by which to access GMail through the Google API (Java client). The scope of the task is that it will retrieve a user's emails, labels etc. It's my first time ...
0
votes
0
answers
322
views
Groovy script to get translations using Google Translate API gives java.lang.NoSuchMethodError
I am trying to write a Groovy script to get translations from Google Translate API (using an API key, stored in as the GOOGLE_API_KEY environment variable1) but I get an error I'm not able to overcome....
0
votes
2
answers
369
views
Google Drive setup push notifications
We want to receive notifications from google when we do anychange(Add,Edit OR Delete) on google drive folder for these purpose we have integrated google watch api in our spring boot application.
code ...
2
votes
1
answer
2k
views
java google drive API unable to download binary file
I have working code to list the files in my Google Drive folder containing binary files but I'm getting an error when trying to download:
GET https://www.googleapis.com/download/drive/v3/files/...
1
vote
1
answer
798
views
Connection Reset error with Google Drive APIs
I am using a Google Service account to create Google Drive resources.
However when i try to execute Drive create folder API i get connection reset error.
I can confirm that the credentials for the ...
1
vote
0
answers
193
views
Stopped reading google tables (invalid stream header: EFBFBDEF)
My integration with Google tables worked successfully for half a year, but today it stopped because of an error
java.io.StreamCorruptedException: invalid stream header: EFBFBDEF
has anyone encountered ...
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
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 ...
0
votes
1
answer
779
views
Google drive API (v2) unable to download few files (with extension xlsx,pdf)
I am trying to download documents/files store in google drive using google drive API version (V2). though I am able to download files successfully except few that are failing with Bad request.
I have ...
2
votes
2
answers
1k
views
How to create a Google calendar event for non-workspace-google account, if the event was created through Service Account(Google Calendar API)?
I am able to create an event in Google Calendar using Service account and Google Calendar API, where Project and Service Account is created in Google Workspace admin account and in the same account, I ...
1
vote
1
answer
318
views
Request had insufficient authentication scopes error when creating teacher through Google Classroom API
I'm trying to create assignments for students through the google classroom api. However, I've learned admins can not do that, only teachers. So in our code, after creating a new course we're then ...
1
vote
1
answer
113
views
Gmail service insert MimeMessage
I have Problem when calling Gmail service to insert a MimeMessage
GoogleCredential credential = new GoogleCredential.Builder()
.setTransport(httpTransport)
....
3
votes
1
answer
5k
views
What is the corect version of google-api-client for use with Admin SDK API?
I am trying to execute this google's directory api to signout users from my application.
which is a POST call
POST https://admin.googleapis.com/admin/directory/v1/users/{userKey}/signOut
where ...
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
2
answers
433
views
Cannot impersonate service account to create calendar events
I'm trying to implement user impersonation with a google service account and have been having problems for a while, this is the code I am using in Java:
GoogleCredential credential = GoogleCredential
...
0
votes
0
answers
333
views
How I can enable google api on server side
I have a android app i am getting serverauthcode and trying to process it here but there is a problem i cant understand. Actually I must access active app user on server side. And i have web ...
1
vote
1
answer
394
views
The result returned by the calendarList.list request is empty
I created a service account to make calendar api calls;But when my code runs, everything looks perfect. But the returned data is empty.The api debugging function I provided on the Google webpage can ...
1
vote
1
answer
744
views
Android google drive v3 api File is not Created/Store application-specific Folder but instead it create in My drive section with "Untitile" file name
I try to create file in google drive app specific folder. I create OAuth 2.0 Client IDs in google developer and enable drive api and also add scopes in OAuth consent screen. App is successful sign in ...
0
votes
1
answer
332
views
Transfer a customer to your reseller account
I am trying to transfer a customer domain to my reseller account.
I have transfer token generated
In the below screen, if I give the domain and transfer token, I will have a customer created with all ...
0
votes
1
answer
883
views
Use Service Account with GoogleAdsClient to make AdWordsSession
I want to use Google Ads API with service account I managed to create a session using this Java code configuration:
ClassLoader classLoader = this.getClass().getClassLoader();
File configFile =...
1
vote
1
answer
932
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 ...
2
votes
1
answer
958
views
Get more than 1000 files from Google Drive Api using batch request and nextPageToken in Java
Is it possible to get more than 1000 files from Google Drive Api using batch request and nextPageToken in Java ? Or maybe there is another solution to get large amount of files without nextPageToken ...
1
vote
1
answer
1k
views
How to solve 403 User Permissions error with Google Drive API (Java)
I recently started using the Google Drive API and have successfully run the quickstart program provided on the Google Drive API page.
The code I used is under "Step 3". When I tried to ...
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 ...
0
votes
1
answer
954
views
Google Cloud - Compute Engine, Insert Instance with Instance Template
I want to create a Instance using a InstanceTemplate via the java google-api-client. After executing the operation the new instance is displayed, beein created, in the Compute Engine frontend of GCP. ...
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
886
views
how to extend the get values while using Google Analytics Data API (GA4) in java to get count of screenPageViews?
I appreciate your attention to my ask.
When I use the below java code to get information from google analytics, it shows just 10 values of pages...
Actually, the total page on my website is 37 pages ...