Google Shared Drives Using REST API
Creating a Connection
The sample code below shows how to create a shared drives connection that uses impersonation. Make sure the following fields are set accordingly.Â
The client_email should be the Google Workspace Admin Service Account.
The subject should be the email for the user you would like to impersonate.
POST {{url}}v1/connections
{
"name": "Google Shared Drives",
"type": "service_account",
"project_id": "your-project-id",
"platform": {
"id": "google-teams"
},
"auth": {
"private_key": "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----\n",
"client_email": "your-service@your-project-id.iam.gserviceaccount.com",
"client_id": "12345678901234567890",
"subject": "youradmin@example.com",
"delete_behavior": "permanent"
}
}