xtekky/gpt4free · error · MissingAuthError
Account not eligible for Antigravity Code Assist.
Error message
Account not eligible for Antigravity Code Assist.
What it means
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.
Source
Thrown at g4f/Provider/needs_auth/Antigravity.py:761
for base_url in BASE_URLS:
for attempt in range(attempts):
try:
url = f"{base_url}:onboardUser"
onboard_headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json",
**ANTIGRAVITY_HEADERS,
}
async with session.post(
url,
headers=onboard_headers,
json=onboard_request_body,
timeout=timeout,
) as resp:
if not resp.ok:
text = await resp.text()
if resp.status == 403:
raise MissingAuthError(
"Account not eligible for Antigravity Code Assist."
)
print(
f"Onboarding attempt {attempt+1} at {base_url} failed with status {resp.status}"
)
print(text)
# Stop attempts on this endpoint and try next base_url
break
payload = await resp.json()
# payload.response?.cloudaicompanionProject?.id
response_obj = payload.get("response") or {}
managed = response_obj.get("cloudaicompanionProject")
if isinstance(managed, dict):
managed_id = managed.get("id")
else:
managed_id = None
View on GitHub (pinned to 973504e177)
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.
Defensive patterns
Strategy: try-catch
Try / catch
from g4f.errors import MissingAuthError
try:
await antigravity.create_async_generator(...)
except MissingAuthError as e:
if "not eligible" in str(e):
# account-level problem: surface to user, do not retry with same account
raise Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Account not eligible for Gemini Code Assist.
- OAuth error: {OAuthCallbackHandler.callback_error}
- Failed to read OAuth credentials from {path}: {e}
- ANTIGRAVITY_SERVICE_ACCOUNT environment variable not set. Pl
- No refresh token found in credentials.
AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14).
Data as JSON: /api/errors/b015844cd11b48d3.
Report an issue: GitHub.