One Star

tGoogleDriveConnection usage

Hello,
I cannot found the documentation of the tGoogleDriveConnection componant.
It needs Two parameters : "Applacation Name" and "Acces token".
Thanks for your help.

JC
12 REPLIES
Seventeen Stars

Re: tGoogleDriveConnection usage

Application name can be freely set - do not think to long abut it.
The AccessToken will be created when you run the job first time. In this case you will get an URL in the console output and this url opened in a browser provides an access token. Copy and past it with " enclosed in you job and run it again. Now it should work.
One Star

Re: tGoogleDriveConnection usage

Hello jlolling,
I did as you told me.
But I didn't get an URL in the console but this error message :
connecting to socket on port 3724
connected
An error occurred: com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized
{
  "code" : 401,
  "errors" : ,
  "message" : "Invalid Credentials"
}
disconnected
José
One Star

Re: tGoogleDriveConnection usage

Hi Guys,
Apparently, I encountered the same error. In my case, I put the Access Token as Client ID via the Service Account created via Google OAuth.
Anyone has the solution on that? Thanks.
Regards,
MG
Four Stars

Re: tGoogleDriveConnection usage

I have the same problem.
Four Stars

Re: tGoogleDriveConnection usage

Can see above my screenshots
Four Stars

Re: tGoogleDriveConnection usage

better with the images
Moderator

Re: tGoogleDriveConnection usage

Hi guys,
Have you already checked component reference about:TalendHelpCenter:tGoogleDriveConnection?
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: tGoogleDriveConnection usage

Hi all,
I'm apologizing I haven't read all the documentation. In fact I  thought that the authorization code was the token. That's why it doesn't work for me. But I also get the problem raised by jcoutin. I resolved it by using  the chrome rest api extension instead of typing the url directly  in the browser.
Thanks.
Moderator

Re: tGoogleDriveConnection usage

Hi taslimanka,
I resolved it by using  the chrome rest api extension instead of typing the url directly  in the browser.

Could you please show us your solution? Screenshot will be preferred.
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: tGoogleDriveConnection usage

Hi Sabrina,
My solution was:
1) I Follow totaly your link ( TalendHelpCenter:tGoogleDriveConnection ) and obtain the token. And I really do all steps described included the usage of Chrome REST Api to obtain the token. I putted the generated token which I pasted to  "Access token" of my tGoogleDriveConnection component.
One Star

Re: tGoogleDriveConnection usage

Hello, I followed all the steps, however getting below feedback from my POST. Any help appreciated?
POST
?
code=***code***
client_id=***client_id***&
client_secret=***client_secret***&
redirect_uri=urn:ietf:wg:oauth:2.0:oob&
grant_type=authorization_code

Response
{
  "error": "unsupported_grant_type",
  "error_description": "Invalid grant_type: "
}
One Star

Re: tGoogleDriveConnection usage

Hello, I followed all the steps, however getting below feedback from my POST. Any help appreciated?
POST
?
code=***code***
client_id=***client_id***&
client_secret=***client_secret***&
redirect_uri=urn:ietf:wg:oauth:2.0:oob&
grant_type=authorization_code

Response
{
  "error": "unsupported_grant_type",
  "error_description": "Invalid grant_type: "
}


Resolved Smiley Happy