Troubleshooting
Common issues and how to resolve them.
"gws: command not found"
Or download a binary from GitHub Releases
npm install -g @googleworkspace/cli "Access blocked" during login
Your account may not be authorized. Contact your admin. If using personal Gmail, ensure the app is published.
"API not enabled"
Click the enable_url in the error message, wait 10 seconds, then retry.
"redirect_uri_mismatch"
Ensure your OAuth client is type "Web application" and the redirect URI matches exactly. Recreate the client if needed.
"No refresh token" / Token expired
Re-download credentials from the web app. Google only issues refresh tokens on first consent. The web app uses prompt=consent to force a new one.
"Invalid credentials" error
Verify GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE points to the correct file. Ensure the file contains both access_token and refresh_token. Re-download credentials from the web app.