Required Scopes
To configure a Sync for Google Drive, you need to request the following scopes from your Google OAuth application:-
https://www.googleapis.com/auth/drive.readonly
If you are syncing only user-selected files, you can request the less permissivehttps://www.googleapis.com/auth/drive.file
scope.This will restrict the sync to only files that the user has selected with the Google Drive File Picker. -
https://www.googleapis.com/auth/admin.reports.audit.readonly
(optional - for including link-sharing access in the Permissions Sync)
Synced Objects
Google Drive supports the following Synced Objects:- Files
Google Docs, Sheets, and Slides will be synced as their Office-compatible equivalent formats:
- Docs: DOCX file
- Sheets: XLSX file
- Slides: PPTX file
- Drawings: PDF file
- Permissions
Files
Send a request to Enable Sync to start a file sync. Syncs for Google Drive can be created with one of the following configurations:- Global Sync: All files in the user’s Google Drive account will be synced.
- Folder Sync: Only files in the specified folder will be synced (recursively including all subfolders).
- Sync of specific files: Only a group of specific files will be synced.
- Global Sync
- Folder Sync
- Sync of specific files
Example
Choosing Files and Folders
You can allow your user to select files from their Google Drive account in your app with the Google Drive File Picker provided by the Paragon SDK.
- In your Google Cloud Console dashboard, navigate to APIs & Services > Library in the sidebar for your app.
- Search for “Google Picker API” from the API Library.
- Select the “Google Picker API” and press the blue “Enable” button to enable the API for your application.

- Navigate to Google Cloud Console > APIs & Services > Credentials. Make sure the selected project in the header is your app.
- Click Create Credentials and select API key.
- An API key value will appear. Copy this value to use in Showing the File Picker.

- Application restrictions: Websites with your origin/domain
- API restrictions: Google Drive API
Showing the File Picker
Use the Paragon SDK in your frontend application to show the File Picker in your app. The SDK provides anExternalFilePicker
class to load Google’s JavaScript into your page and authenticate with your user’s connected Google Drive account.
To initialize the picker you will need your Google Drive API key and your Google Cloud project number. The Google Cloud project number is a unique, numerical identifier for your project. You can find it within the Google Cloud Console from the sidebar navigation under IAM & Admin section > Settings.