Skip to main content
POST
/
api
/
v1
/
google
/
{agent_id}
/
oauth
/
start
Start Google OAuth
curl --request POST \
  --url https://dev.voice.ai/api/v1/google/{agent_id}/oauth/start \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "return_path": "<string>",
  "managed_tools": {
    "google_calendar": {
      "enabled": true,
      "default_calendar_id": "<string>",
      "timezone": "<string>",
      "selected_operations": [
        "google_calendar_check_availability"
      ]
    },
    "google_sheets": {
      "enabled": true,
      "spreadsheet_id": "<string>",
      "sheet_name": "<string>",
      "selected_operations": [
        "google_sheets_append_row"
      ]
    },
    "google_gmail": {
      "enabled": true,
      "selected_operations": [
        "google_gmail_search_messages"
      ]
    }
  }
}
'
{
  "auth_url": "<string>",
  "requested_scopes": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your API key as the bearer token. Format: Authorization: Bearer

Path Parameters

agent_id
string
required

Body

application/json
return_path
string

Optional relative return path or allowlisted absolute app URL to return to after OAuth completes.

managed_tools
ManagedGoogleToolsConfig · object

Response

Successful Response

auth_url
string
required

Google OAuth authorization URL to open in a popup or browser.

requested_scopes
string[]
required