← providers

Google Docs

Read and manage Google Docs documents

Endpoints

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

ActionMethodPathMin scope
Read documentGETread
Create documentPOSTwrite
Batch update documentPOSTwrite

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-docs", "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 Docs and logs the action.

Read document
curl -X GET "https://okoro.ai/p/google-docs/documents/{id}" \
  -H "Authorization: Bearer $TOKEN"
Create document
curl -X POST "https://okoro.ai/p/google-docs/documents" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Batch update document
curl -X POST "https://okoro.ai/p/google-docs/documents/{id}:batchUpdate" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Scopes

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

read
GET
/documents/*
write
GET POST
/documents /documents/* /documents/*:batchUpdate
update
GET POST
/documents /documents/* /documents/*:batchUpdate
delete
GET POST
/documents /documents/* /documents/*:batchUpdate
all
GET POST
/**