Setting up Gmail access using gog skill

Goal:
Integrate Gmail access into Clawdbot running on a DigitalOcean VPS using the gog (Google Workspace CLI) skill.

Environment:
β€’ Clawdbot running on a DigitalOcean VPS
β€’ gog CLI installed
β€’ ~/.clawdbot/clawdbot.json configured with:
β€’ GOG_KEYRING_BACKEND: file
β€’ GOG_KEYRING_PASSWORD (passphrase)
β€’ GOG_ACCOUNT: xxxx@gmail.com
β€’ GOOGLE_APPLICATION_CREDENTIALS: /root/.clawdbot/credentials/google-oauth-client.json (confirmed to exist)

Problem:
Unable to complete the OAuth 2.0 authorization flow for gog because the interactive process consistently times out.

Steps Taken and Observations:
1. Initial Authentication Attempt:
The gog authorization process was initiated via command line.
2. Interactive Authorization Flow:
In the headless environment, the command outputs a Google OAuth URL containing parameters such as access_type=offline, client_id, redirect_uri=http://127.0.0.1:<port>/oauth2/callback, response_type=code, and Gmail scope.
3. Manual User Intervention:
The user is instructed to:
β€’ Copy the URL
β€’ Open it in a local browser
β€’ Log into the Google account and grant permissions
β€’ After authorization, Google redirects to a 127.0.0.1:<port>/oauth2/callback?code=<authorization_code> URL
β€’ Copy the <authorization_code> from the redirected URL
β€’ Paste the code back into the chat
4. Persistent Timeouts:
β€’ This process was attempted multiple times (3–4).
β€’ Each time, the gog auth add command times out while waiting for the authorization code.
β€’ When attempting to write the authorization code back to the session, the error received is:
"No active session found for <session_id>"
Was this page helpful?