{"record":{"id":"b015844cd11b48d3","repo":"xtekky/gpt4free","slug":"account-not-eligible-for-antigravity-code-assist","errorCode":null,"errorMessage":"Account not eligible for Antigravity Code Assist.","messagePattern":"Account not eligible for Antigravity Code Assist\\.","errorType":"exception","errorClass":"MissingAuthError","httpStatus":null,"severity":"error","filePath":"g4f/Provider/needs_auth/Antigravity.py","lineNumber":761,"sourceCode":"            for base_url in BASE_URLS:\n                for attempt in range(attempts):\n                    try:\n                        url = f\"{base_url}:onboardUser\"\n                        onboard_headers = {\n                            \"Authorization\": f\"Bearer {access_token}\",\n                            \"Content-Type\": \"application/json\",\n                            **ANTIGRAVITY_HEADERS,\n                        }\n                        async with session.post(\n                            url,\n                            headers=onboard_headers,\n                            json=onboard_request_body,\n                            timeout=timeout,\n                        ) as resp:\n                            if not resp.ok:\n                                text = await resp.text()\n                                if resp.status == 403:\n                                    raise MissingAuthError(\n                                        \"Account not eligible for Antigravity Code Assist.\"\n                                    )\n                                print(\n                                    f\"Onboarding attempt {attempt+1} at {base_url} failed with status {resp.status}\"\n                                )\n                                print(text)\n                                # Stop attempts on this endpoint and try next base_url\n                                break\n\n                            payload = await resp.json()\n                            # payload.response?.cloudaicompanionProject?.id\n                            response_obj = payload.get(\"response\") or {}\n                            managed = response_obj.get(\"cloudaicompanionProject\")\n                            if isinstance(managed, dict):\n                                managed_id = managed.get(\"id\")\n                            else:\n                                managed_id = None\n","sourceCodeStart":743,"sourceCodeEnd":779,"githubUrl":"https://github.com/xtekky/gpt4free/blob/973504e1770928ed5fb82f43da528f441ad9ddc3/g4f/Provider/needs_auth/Antigravity.py#L743-L779","documentation":"During onboarding, the Antigravity Code Assist loadCodeAssist/onboardUser endpoint returned HTTP 403, which the provider maps to MissingAuthError. It means the authenticated Google account is not permitted to use Antigravity/Gemini Code Assist — the OAuth login succeeded but the account lacks eligibility (license/allowlist) for the service.","triggerScenarios":"POST to the onboarding URL across base URLs returns 403 with the account's bearer token. Typical for personal Google accounts without Gemini Code Assist access, Workspace accounts where the admin disabled the service, or accounts outside the allowlisted regions/plans.","commonSituations":"Using a plain Gmail account where a licensed Workspace/Cloud account is required; org policy blocking Cloud AI Companion; free-tier quota on Gemini Code Assist exhausted and the account is gated.","solutions":["Log in with a Google account that has Gemini Code Assist / Antigravity entitlement (e.g. Workspace or Cloud with the API enabled).","Ask your Workspace admin to enable the Cloud AI Companion / Gemini Code Assist service for your org unit.","Verify the project attached to the account has the required API enabled in Google Cloud Console.","If you believe the account is eligible, re-run onboarding after re-authenticating; a stale token can also surface as 403."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from g4f.errors import MissingAuthError\n\ntry:\n    await antigravity.create_async_generator(...)\nexcept MissingAuthError as e:\n    if \"not eligible\" in str(e):\n        # account-level problem: surface to user, do not retry with same account\n        raise","preventionTips":["Use a Google account with Gemini Code Assist / Antigravity entitlement","Pre-verify eligibility by completing onboarding during setup, not at request time","Keep a fallback provider configured for accounts without eligibility"],"tags":["authorization","antigravity","google-workspace","onboarding"],"backgroundTag":null,"analyzedSha":"973504e1770928ed5fb82f43da528f441ad9ddc3","analyzedAt":"2026-08-14T23:45:32.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}