Four Stars

tGoogleAnalyticsInput 401 Unauthorized

Hello Everyone,

 

 

I am creating a job where i need to pull the data from Google Analytics .I had already register the Service account and downloaded the .p12 key File.While running the job i am facing the error

 

tarting job filefetch at 13:05 15/11/2017.

[statistics] connecting to socket on port 3509
[statistics] connected
WARN:Got error:401 Unauthorized
ERROR
top processing because of this error does not allow a retry.
Exception in component tGoogleAnalyticsInput_1
com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:384)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
[statistics] disconnected
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at de.jlo.talendcomp.google.analytics.v3.GoogleAnalyticsInput.doExecute(GoogleAnalyticsInput.java:334)
at de.jlo.talendcomp.google.analytics.v3.GoogleAnalyticsInput.executeDataQuery(GoogleAnalyticsInput.java:267)
at de.jlo.talendcomp.google.analytics.v3.GoogleAnalyticsInput.executeQuery(GoogleAnalyticsInput.java:318)
at local_project.filefetch_0_1.filefetch.tGoogleAnalyticsInput_1Process(filefetch.java:629)
at local_project.filefetch_0_1.filefetch.tSetProxy_1Process(filefetch.java:385)
at local_project.filefetch_0_1.filefetch.runJobInTOS(filefetch.java:1026)
at local_project.filefetch_0_1.filefetch.main(filefetch.java:883)
Job filefetch ended at 13:05 15/11/2017. [exit code=1].

 

Can you please let me know the root cause of it. An early response is highly appreciated.

 

Thanks

 

Rohit

3 ACCEPTED SOLUTIONS

Accepted Solutions
Moderator

Re: tGoogleAnalyticsInput 401 Unauthorized

Hello,

From the error message, it seems you have an issue with OAuth 2.0.

Could you please have a look at this article:https://www.rilhia.com/tutorials/using-oauth-20-talend-access-google-apis to see if it is OK with you?

Best regards

Sabrina

 

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: tGoogleAnalyticsInput 401 Unauthorized

Hello Sabrina,

Thanks for your help.The error got resolved.I have gone through the URL provided and it is very helpful.

Thanks

Rohit
Moderator

Re: tGoogleAnalyticsInput 401 Unauthorized

Hello Rohit ,

Thanks for your feedback. Feel free to post your issue on forum.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
3 REPLIES
Moderator

Re: tGoogleAnalyticsInput 401 Unauthorized

Hello,

From the error message, it seems you have an issue with OAuth 2.0.

Could you please have a look at this article:https://www.rilhia.com/tutorials/using-oauth-20-talend-access-google-apis to see if it is OK with you?

Best regards

Sabrina

 

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: tGoogleAnalyticsInput 401 Unauthorized

Hello Sabrina,

Thanks for your help.The error got resolved.I have gone through the URL provided and it is very helpful.

Thanks

Rohit
Moderator

Re: tGoogleAnalyticsInput 401 Unauthorized

Hello Rohit ,

Thanks for your feedback. Feel free to post your issue on forum.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.