Bug
After running gws auth login, all API calls fail with:
{
"error": {
"code": 401,
"message": "Access denied. No credentials provided.",
"reason": "authError"
}
}
However, gws auth status reports everything is valid:
token_valid: true
has_refresh_token: true
encryption_valid: true
storage: encrypted
- All scopes present
Reproduction
gws auth login (select scopes, complete OAuth flow — succeeds)
gws auth status (shows valid credentials)
gws calendar +agenda → 401 authError
gws auth export --unmasked > creds.json
GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=creds.json gws calendar +agenda → works
Environment
- macOS (Darwin 25.3.0, Mac mini)
gws installed via npm
- Encryption key stored at
~/.config/gws/.encryption_key (keyring backend: file)
- Encrypted credentials exist at
~/.config/gws/credentials.enc
Workaround
Export credentials to plaintext and point the env var at them:
gws auth export --unmasked > ~/.config/gws/credentials_plain.json
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE="$HOME/.config/gws/credentials_plain.json"
Notes
The encrypted credentials file exists and gws auth status correctly reads it, but actual API calls seem unable to decrypt/use them. Possibly a keyring/decryption issue on macOS when using the file-based encryption key backend.