I’m working on a PHP project and need help with Google Docs integration. I’ve been looking at the documentation but can’t figure out the best approach.
What I’m trying to accomplish:
- Display a Google document directly inside my website
- Let users modify the document without requiring them to log into Google
- Track editing history using my application’s user system instead of Google accounts
Is this kind of setup possible? I’m not sure if the API supports anonymous editing or if there’s a way to map my local users to the document changes. Any guidance on the implementation would be helpful.
Google forces authentication for any real document work, which complicates your anonymous editing plans. I’ve faced similar integration challenges in the past; you can embed Google Docs via iframe for viewing, but editing remains restricted behind their login wall. Utilizing service accounts can help to some extent, yet you are still bound by Google’s permission structures. For your requirements, consider using OnlyOffice Document Server. It offers collaborative editing without mandatory user accounts and integrates well with PHP. Their API allows you to manage user tracking using your own system while maintaining document versioning. While it demands more initial setup compared to Google’s simpler options, it provides greater control over user experience and enables seamless document editing within your existing authentication framework.
What you’re describing hits Google’s authentication wall. Their Docs API requires user auth for any write operations - anonymous editing just won’t work through official channels. I ran into this same problem last year and worked around it using a service account as a middleman. Your PHP app authenticates with Google using service credentials, then handles document access through share permissions. But users still need Google accounts for direct editing. You might want to look at alternatives like CKEditor with real-time collaboration or build your own editor with something like Quill.js. More complex to integrate, but you’ll have full control over user management and editing history without Google’s auth restrictions. Way more flexibility to build exactly what you need.
hey, i get your point. unfortuntly, Google Docs API needs users to have accounts for editing, so true anonymous editing isn’t really supported. you might wanna look into Etherpad or Collabora Online, they can let users edit docs right in the browser with no sign in.