Is it possible to query publicly shared user documents in Google Docs without authentication?
The specific end goal I am looking for is to be able to supply a user id, and then list all publicly shared docs with a particular tagged in a collection.
Thanks.
This is not possible with the Google Docs API, you will need to be authorized to be able to list these publicly shared files.
I don't think this answer is 100% correct. If the document is shared globally (publicly accessible), then it should be possible according to these Stack Overflow posts:
Accessing Google Spreadsheet with Zend without Authentication
or
Read content of public shared file in Google Drive
Related
I need to upload files to a client's shared folder on OneDrive, however, there's no way I can get them to allow Files.WriteAll for my application (I'm using application permissions, not delegation) -- I've asked them. Is there another way to do that?
I have looked into multiple SO questions about this and on Microsoft's documentation, and I believe it is not possible, but I would like to know from people with more experience using Microsoft's service if it is indeed true.
I have an outside developer who is asking for a credentials.json file in order to write to a Google Sheet.
I'd like to restrict the developer's access to just a single file, so I've made a service account with access to just that sheet. However, I'm quite unfamiliar with service accounts and the amount of access they allow. For example, it's unclear to me if the service account will have access to any files/scripts/processes outside of the single sheet shared with it and the API project in which it lives. Is there a way to check that? Or any documentation on best practices for granting this kind of access? (Or really, any kind of "Google APIs" for Dummies I could read.)
For context, I have basic programming experience, but top out at Javascript in AppScripts.
Google has rolled out a useful tool of compare docs.
https://9to5google.com/2019/06/11/google-docs-compare-documents/
I need to access through an API because I'm comparing many documents. I searched through the API reference but didn't find it. Did i just miss it or is it not available?
Answer:
This feature is not available via the Docs API.
More Information
Fundamentally, the Google Docs API lets you create and modify documents.
From the documentation:
The API allows you to do tasks such as the following:
Automate processes
Create documentation in bulk
Generate invoices or contracts
It is not an API which has methods that directly replicate the methods available in the user interface.
Workaround:
The Revisions resource of the Drive API might be an approximate solution for you, as it allows revisions of documents to be accessed and downloaded via export links.
As Google Documents have some level of version control implementation, it might be possible to use this to make document comparisons. Unfortunately however, there is no direct way of comparing changes, and as per a recent Issue Tracker case it seems that due to the zip nature of .docx files, not even exporting and comparing MD5s can be a direct solution for this.
Feature Request:
You can however let Google know that this is a feature that is important for the Docs or Drive API and that you would like to request they implement it. You can use the aforelinked Google's Issue Tracker to report issues and make feature requests for their development services.
The page to file a Feature Request for the Google Docs API is here and the Google Drive API is here
References:
Introduction | Google Docs API | Google Developers
Revisions | Google Drive API | Google Developers
Issue Tracker Links:
Google Docs export returns non-stable (i.e. different) bytes content for each ex
Docs API Feature Request | New Issue - Issue Tracker
Drive API Feature Request | New Issue - Issue Tracker
Since Graph is a self-documenting language, I wanted to use this to my advantage and write PowerShell functions to automatically generate cmdlets based on metadata. I've got a lot of this complete, but am having problems figuring out scopes. Is there a way to find scopes? It's not stored in the metadata and the documentation doesn't have scopes listed for everything (for instance, nothing in Excel has scopes listed).
The Graph Explorer seems to request correct permissions, so that has access to this list somewhere.
It depends on which API you are looking for.
Scopes for Azure AD Graph API is at https://msdn.microsoft.com/library/azure/ad/graph/howto/azure-ad-graph-api-permission-scopes.
There is a huge list for different parts of the Microsoft Graph API at https://developer.microsoft.com/en-us/graph/docs/authorization/permission_scopes.
When you first sign in to Graph Explorer, you give it these permissions:
Based on the descriptions and the link above you can figure out what the scope name is for each of the items in the list. (E.g. the first one is Mail.ReadWrite).
When you create an application in Azure AD, you configure which applications it needs access to, and what access it needs. That results in the list which the user grants access to on first signin.
Google's Drive service is great, but their documentation is quite confusing...What I want to do is to create a portfolio site where upon request I fetch all files contained in a particular folder from my Google Drive (e.g. a photo gallery). This requires iterating through an amount of subfolders and store the file data in a JS object, XML feed or similar. Language is not so important. Simply using the "Publish to the web" feature won't do as I can only make manual requests and they're very limited.I've tried to use the Files: list provided in the SDK but it won't work without requiring OAuth 2. Found out that its possible to make a "domain-wide delegation of authority" and bypass its authorization but that would require me to set up a Google Apps domain. Seriously, all that to fetch some files?
My best guess now is to use the https://googleapis.com/auth/drive.metadata.readonly scope, but from there I'm out of ideas.