Use the Google Contacts CLI from KosmoKrator to call Google Contacts tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Google Contacts can be configured headlessly with `kosmokrator integrations:configure google_contacts`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure google_contacts --set access_token="$GOOGLE_CONTACTS_ACCESS_TOKEN" --enable --read allow --write ask --jsonkosmokrator integrations:doctor google_contacts --jsonkosmokrator integrations:status --json
Credentials
Authentication type: OAuth browser flowoauth2_authorization_code. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
access_token
GOOGLE_CONTACTS_ACCESS_TOKEN
Secret secret
yes
Access Token
url
GOOGLE_CONTACTS_URL
URL url
no
API Base URL
Call Google Contacts Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Google Contacts.
google_contacts.google_contacts_list_connections
Read read
List contacts (connections) from the authenticated user's Google Contacts. Returns names, emails, phone numbers, biographies, organizations, and photos. Supports pagination and incremental sync.
Get detailed information about a specific contact by resource name (e.g., "people/c123456789"). Returns names, emails, phone numbers, biographies, organizations, and photos.
List all contact groups in the user's Google Contacts. Includes system groups (e.g., "My Contacts", "Starred") and user-created groups. Returns group name, type, and member count.
Get details of a specific contact group by resource name (e.g., "contactGroups/myContacts"). Returns the group name, type, member count, and member resource names.
List "Other Contacts" — people the user has interacted with (e.g., via email) but hasn't added to their contacts. Returns names, email addresses, and phone numbers.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
google_contacts.google_contacts_list_connections
List contacts (connections) from the authenticated user's Google Contacts. Returns names, emails, phone numbers, biographies, organizations, and photos. Supports pagination and incremental sync.
Number of connections to return per page (1–2000, default 200).
pageToken
string
no
Token from a previous response to retrieve the next page of results.
sortOrder
string
no
Sort order for results: "LAST_NAME_ASCENDING" or "LAST_NAME_DESCENDING".
syncToken
string
no
Sync token from a previous list response to return only contacts that changed since then.
google_contacts.google_contacts_get_connection
Get detailed information about a specific contact by resource name (e.g., "people/c123456789"). Returns names, emails, phone numbers, biographies, organizations, and photos.
List all contact groups in the user's Google Contacts. Includes system groups (e.g., "My Contacts", "Starred") and user-created groups. Returns group name, type, and member count.
Number of groups to return per page (1–2000, default 200).
pageToken
string
no
Token from a previous response to retrieve the next page.
syncToken
string
no
Sync token from a previous list response to return only groups that changed.
google_contacts.google_contacts_get_contact_group
Get details of a specific contact group by resource name (e.g., "contactGroups/myContacts"). Returns the group name, type, member count, and member resource names.
List "Other Contacts" — people the user has interacted with (e.g., via email) but hasn't added to their contacts. Returns names, email addresses, and phone numbers.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.