Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I was looking at the tGoogleDriveGet component and expecting it to be pretty simple to read a public file. However, all the docs I can find go on about authentication etc. Are there any simple examples about?
Thanks
Andy
Yes, but the Google Drive API requires that users are authenticated. This can be see here: https://developers.google.com/drive/api/v3/about-auth
This isn't simple I'm afraid. OAuth 2.0 is a multi step authentication process. Great when you have configured it, and very easy. But configuring your token initially is a real pain. I have written a tutorial on this here: https://community.talend.com/t5/Design-and-Development/Using-OAuth-2-0-with-Talend-to-Access-Google-...
Thanks for the reply.
I'm surprised you need to authenticate to read a public file - sounds like a bug.
How do you mean a public file? Can you access it without any Google credentials manually? Could I, for example, call the URL without being logged in to any Google product and just download the file?
yes - here is an example file which you should be able to view:
https://docs.google.com/document/d/1L9yyhw3S5KHHzhcGF72r_J7_7NV1yQ3frHF-TXa8HHc/edit?usp=sharing
I've just had a look. I don't think this is a bug, this looks like a limitation of the Google Drive API. It seems that you need to have credentials to be able to find file ids. This kind of makes sense, as the credentials will let the API know of your access levels.
But the file ID is in the URL
Yes, but the Google Drive API requires that users are authenticated. This can be see here: https://developers.google.com/drive/api/v3/about-auth
Ok, thanks. Don't seem to have Developer Console enabled in our company G Suite, so i'll have to do it in Java.
It might be easier and quicker to just set up a Gmail account to use for this purpose. Certainly quicker than writing a load of code.