#google code assist oauth 400 error
1 messages · Page 1 of 1 (latest)
A 400 during “Google Code Assist” OAuth can come from two totally different places, so first: is the 400 page coming from accounts.google.com, or from a http://localhost:8085/... (or localhost:51121) callback URL?
A couple quick checks / the “known good” setup:
- What version are you on?
openclaw --version
- Make sure you’re using the plugin auth flow (not a client id/secret in config):
- For Google Code Assist / Gemini CLI OAuth:
openclaw plugins enable google-gemini-cli-auth openclaw models auth login --provider google-gemini-cli --set-default
- For Antigravity (different thing; different OAuth client + callback port):
openclaw plugins enable google-antigravity-auth openclaw models auth login --provider google-antigravity --set-default
- If your Gateway is on a VPS/headless box: open the auth URL on your laptop, complete login, then when it redirects to
http://localhost:8085/oauth2callback?...(orhttp://localhost:51121/oauth-callback?...) it may fail to load — that’s expected. Copy the full redirect URL from the browser address bar and paste it back into the CLI when it asks for manual redirect input.
If you paste the exact error text (or screenshot) from the 400 page + tell me which provider you’re logging into (google-gemini-cli vs google-antigravity), I can point to the specific fix (common ones are redirect_uri_mismatch, access_denied due to Workspace/admin policy, or the callback happening on the “wrong” machine). Docs reference: https://docs.openclaw.ai/concepts/model-providers and https://docs.openclaw.ai/tools/plugin
im using the 2026.3.2 version, when i pair it and login it says it successfully logins but in the openclaw terminal it says loadcodeassist 400 error bad request
That helps — in 2026.3.2 a loadCodeAssist ... 400 Bad Request happens after OAuth succeeds. It’s the “provision / discover your Code Assist project” step hitting Google’s Cloud Code Assist backend (cloudcode-pa.googleapis.com/v1internal:loadCodeAssist), not the OAuth exchange itself.
In practice it usually means one of these:
- Your Google account isn’t eligible / is blocked by policy (common with Google Workspace / managed org accounts), so Code Assist onboarding calls get rejected.
- Your account requires an explicit GCP project ID (Workspace GCA path). In that case you need to set
GOOGLE_CLOUD_PROJECT(orGOOGLE_CLOUD_PROJECT_ID) during login.
Try this first (set a project)
Pick an existing GCP project you own/control, then run:
GOOGLE_CLOUD_PROJECT="your-project-id" openclaw models auth login --provider google-gemini-cli --set-default
(If you prefer, export GOOGLE_CLOUD_PROJECT=... in your shell and re-run the command.)
There’s also a Google doc the upstream code points to for Workspace accounts: