Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Read a Google drive public file

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  

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

View solution in original post

9 Replies
Anonymous
Not applicable
Author

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-...

Anonymous
Not applicable
Author

Thanks for the reply.

I'm surprised you need to authenticate to read a public file - sounds like a bug.

Anonymous
Not applicable
Author

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?

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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. 

Anonymous
Not applicable
Author

But the file ID is in the URL

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Ok, thanks. Don't seem to have Developer Console enabled in our company G Suite, so i'll have to do it in Java.

Anonymous
Not applicable
Author

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.