Google Drive
Create a Google Drive connection using the DryvIQ REST API.
Table of Contents
Create a Connection
The code below shows how to create a new connection using a REST API call. The GET request returns JSON with the OAuth2 target URL needed to finish the connection creation. Follow the given URL to complete the connection setup.
GET {{url}}v1/connections/platforms/google-drive/new
Creating a Connection with a Delete Policy
Soft delete is the default delete policy. This means deleted items are moved to the platform's trash. The code below shows how to set the delete policy to "permanent" when creating a new connection using a REST API call.
- Send the GET request below.
GET {{url}}v1/connections/platforms/google-drive/new
- The GET request returns JSON with the OAuth2 target URL needed to finish the connection creation.
- Copy and paste the URL generated in your browser and add the following at the end of it: %26delete_behavior%3Dpermanent.
- Follow the given URL to complete the connection setup.
Creating a Connection Using CLI
The CLI command below returns the OAuth 2.0 target URL needed to complete the connection creation. In most environments, the URL will be automatically opened in your default browser to complete the creation process. If not, follow the provided URL to complete the connection setup. (See CLI: Connections for more information.)
skysync-cli connections add --platform google-drive