Menu

Copying Folders From Google Drive to Dropbox With Only the drive.file Scope
📰

Copying Folders From Google Drive to Dropbox With Only the drive.file Scope

DEV Community: php·Michael Etokakpan·7 days ago
#CnKkYuQA
#devto#dev#drive#dropbox#google
Long article (1078 words) — no AI summary yet.
Reading 0:00
15s threshold

I recently added Google Drive to Dropbox transfers to WetoDrive, a small app that copies files between cloud accounts on the server. The Dropbox side was routine. The Google side was shaped almost entirely by one choice: the app only asks for the drive.file scope.

This post covers what that scope lets you do, the folder behaviour that surprised me, and the Dropbox upload-session details that matter when the bytes are streaming in from somewhere else.

Why drive.file

To read a user's Drive files you would normally ask for drive.readonly or drive . Both are restricted scopes. If your server stores or handles that data, Google requires a security assessment before you can go live, and it has to be renewed every year. For a small app that is a large fixed cost.

drive.file is not restricted. It gives access to files your app created, plus files the user explicitly opens with your app . The standard way to do the second part is the Google Picker:

const view = new google . picker . DocsView ( google . picker .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.