#google code assist oauth 400 error

1 messages · Page 1 of 1 (latest)

clear torrent
#

google code assist oauth 400 error

jolly spireBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

silver pineBOT
#

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:

  1. What version are you on?
openclaw --version
  1. 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
    
  1. 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?... (or http://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

clear torrent
#

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

silver pineBOT
#

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:

  1. Your Google account isn’t eligible / is blocked by policy (common with Google Workspace / managed org accounts), so Code Assist onboarding calls get rejected.
  2. Your account requires an explicit GCP project ID (Workspace GCA path). In that case you need to set GOOGLE_CLOUD_PROJECT (or GOOGLE_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: