ArgorantDocs

Connect a Google Workspace

One approval by the Workspace admin lists every mailbox and alias. Pick the ones that should send. No passwords and no sign-in per mailbox.

Ask for the delegation values

Shell
curl -X POST "https://app.argorant.com/api/v1/inboxes/google-workspace" \
  -H "Authorization: Bearer $ARGORANT_API_KEY" -H "Content-Type: application/json" \
  -d '{"admin_email":"admin@yourdomain.com"}'

Until the admin approved it, the answer has ok: false, mailboxes: null and a setup block with client_id, scopes_csv and delegation_url, the values the admin needs.

Grant it in Google Admin

In Google Admin open Security, then Access and data control, API controls, Domain-wide delegation and Add new. Paste the client id and the scopes exactly as returned. An admin does this once per Workspace.

List and connect

Call the same endpoint again. It now returns every mailbox and alias. Then send the addresses to connect, or an empty list for all of them:

Shell
curl -X POST "https://app.argorant.com/api/v1/inboxes/google-workspace" \
  -H "Authorization: Bearer $ARGORANT_API_KEY" -H "Content-Type: application/json" \
  -d '{"admin_email":"admin@yourdomain.com","emails":["elena@yourdomain.com","marina@yourdomain.com"]}'
# {"connected": [{"email": "elena@yourdomain.com", "health": "healthy"}]}

Connected mailboxes show up in GET /api/v1/inboxes with their health, daily limit and today's sends, and can send for any campaign. In the terminal the same is npx argorant inboxes connect-google --admin admin@yourdomain.com --all.

On this page