← providers

Google Drive

Read and manage files in Google Drive

Endpoints

Call these through the okoro proxy at https://okoro.ai/p/google-drive

ActionMethodPathMin scope
Read drive infoGETread
List filesGETread
Read fileGETread
Export fileGETread
Create filePOSTwrite
Copy filePOSTwrite
Update filePATCHupdate
Delete fileDELETEdelete
Read permissionGETread
Share filePOSTwrite
Remove permissionDELETEdelete

Examples

Every request requires a short-lived operation token scoped to a single action.

1. Get an operation token

Exchange your service token for a short-lived operation token scoped to a single action.

TOKEN=$(curl -sX POST "https://okoro.ai/t/tokens" \
  -H "Authorization: Bearer $OKORO_SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "google-drive", "scope": "read", "intent": "describe what you are doing"}' \
  | jq -r '.token')

2. Call the API

Use the operation token as a Bearer token. The proxy forwards the request to Google Drive and logs the action.

Read drive info
curl -X GET "https://okoro.ai/p/google-drive/about" \
  -H "Authorization: Bearer $TOKEN"
List files
curl -X GET "https://okoro.ai/p/google-drive/files" \
  -H "Authorization: Bearer $TOKEN"
Read file
curl -X GET "https://okoro.ai/p/google-drive/files/{id}" \
  -H "Authorization: Bearer $TOKEN"
Export file
curl -X GET "https://okoro.ai/p/google-drive/files/{id}/export" \
  -H "Authorization: Bearer $TOKEN"
Create file
curl -X POST "https://okoro.ai/p/google-drive/files" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Copy file
curl -X POST "https://okoro.ai/p/google-drive/files/{id}/copy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Update file
curl -X PATCH "https://okoro.ai/p/google-drive/files/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Delete file
curl -X DELETE "https://okoro.ai/p/google-drive/files/{id}" \
  -H "Authorization: Bearer $TOKEN"
Read permission
curl -X GET "https://okoro.ai/p/google-drive/permissions/{id}" \
  -H "Authorization: Bearer $TOKEN"
Share file
curl -X POST "https://okoro.ai/p/google-drive/permissions" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Remove permission
curl -X DELETE "https://okoro.ai/p/google-drive/permissions/{id}" \
  -H "Authorization: Bearer $TOKEN"

Scopes

Your service token must be configured with at least the required scope level.

read
GET
/drive/v3/about /drive/v3/files /drive/v3/files/* /drive/v3/files/*/export /drive/v3/files/*/permissions /drive/v3/files/*/permissions/*
write
GET POST
/drive/v3/files /drive/v3/files/* /drive/v3/files/*/copy /upload/drive/v3/files
update
GET POST PATCH
/drive/v3/files/* /drive/v3/files/*/permissions /drive/v3/files/*/permissions/* /upload/drive/v3/files/*
delete
GET POST PATCH DELETE
/drive/v3/files/* /drive/v3/files/*/permissions/*
all
GET POST PATCH DELETE
/drive/v3/** /upload/drive/v3/**