Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tGoogleAnalyticsInput getting "error" : "invalid_grant"

I am using talend openStudio for data Integration 5.2.2.r99271. i want to pull the data through tGoogleAnlytricsInput Component.i had already register the Service account and downloaded the .p12 key File. when i am running my job getting errors
Exception in component tGoogleAnalyticsInput_1
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
"error" : "invalid_grant"
}
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:103)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:303)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:323)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:320)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:505)

i am new to talend .i urgent need help on this
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

After two days of struggling ,got the solution by changing the system time sync with NTP.

View solution in original post

5 Replies
Anonymous
Not applicable
Author

After two days of struggling ,got the solution by changing the system time sync with NTP.
Anonymous
Not applicable
Author

Sorry for our silence. We do our best to answer as many posts as possible.
Glad that you found a workaround.
Thanks for sharing your solution.
I have to admit the error is not very explicit, feel free to open a JIRA to request for this error to be enhanced.
Elisa
Anonymous
Not applicable
Author

Hi Ashish,
I am also getting the same error . May i know which system time did u change.
Can you please elaborate on your solution, i am finding hard to understand since i am a newbie 0683p000009MACn.png
Thank You
Anonymous
Not applicable
Author

Check your system time of the server where this job is running. The problem is, in the request to get an token is the time included because the token is only valid for a particular time. If Google recognizes an time what is in the future (also only for a milli second) the API reject that request and you will get the mentioned error message.
If you are unable to take care a exact time you can configure in the component a time delay called Static time offset (advanced settings) Please set here a larger time. This offset in milliseconds will be added to the time used for the request.
BTW it is not necessary to struggle 2 long days with a problem on my components. You can simply ask me. I do not bite!
Anonymous
Not applicable
Author

Thanks jlolling for giving me a clue. 
I was also facing the same issue. But the solution was a bit different. I was facing the issue because I did not copy the token.properties file to server. Now the code is working fine.
Thanks