Upload documents to app's Google Drive without user permissions prompt

I’m building an app called DocUploader that lets users upload files. The app stores these files in its own Google Drive account. But here’s the problem:

When a user uploads a file, they get a message asking for permission to access their Google Drive. This is confusing because DocUploader doesn’t touch the user’s Drive at all.

Is there a way to skip this permission request? I want users to be able to upload files without seeing any Google Drive-related messages.

My current setup:

  • User logs into DocUploader
  • User uploads a file through our interface
  • File gets saved to DocUploader’s Google Drive
  • User sees a confusing permissions message

What I want:

  • User uploads file
  • File saves to our Drive
  • No permissions message

Any ideas on how to make this work? Thanks for your help!

hey, i’ve dealt with this before. u don’t need user perms at all. use a service account instead. it’s like a special google account for ur app. set it up in google cloud, give it access to ur drive, then use those creds in ur code. no more annoying prompts for users. just make sure u handle security right on ur end

As someone who’s worked on similar projects, I can relate to your frustration with the Google Drive permissions issue. One approach that worked well for me was using a service account instead of user authentication.

Here’s how it goes:

  1. Create a service account in Google Cloud Console
  2. Give this account access to your app’s Google Drive
  3. Use the service account credentials in your backend code

This way, your app can interact with its own Drive without involving the user’s account at all. The upload process becomes seamless - no permissions prompt, just a smooth file transfer to your app’s storage.

Remember to handle file naming and organization on your end to avoid conflicts. Also, make sure to implement proper security measures since you’re now responsible for managing access to these files.

It took some initial setup, but it greatly improved the user experience in my case. Hope this helps!

I’ve encountered this issue before, and there’s a straightforward solution. Instead of using OAuth 2.0 for user authentication, you should implement server-to-server authentication with a service account.

Create a service account for your application in the Google Cloud Console. Then, grant this account the necessary permissions to access and modify your app’s Google Drive. In your backend code, use the service account credentials to authenticate and perform Drive operations.

This approach bypasses the need for user consent entirely, as your app will be acting on its own behalf rather than on behalf of the user. Users can upload files through your interface, and your server will handle the Google Drive interaction invisibly.

Just ensure you implement proper security measures and file management on your end. This method should provide the seamless experience you’re aiming for.