Sign Up with Google
horizon_signup_googleCreates a Google player from a fresh OAuth authorization code, or signs in an existing Google identity when explicitly enabled. Use after Google OAuth consent for signup or one-click signin.
Instructions
Creates a Google player, or signs an existing Google player in when signInIfExists is explicitly enabled. Use when: the player completes Google OAuth and explicitly chooses registration or one-click signup/signin. Not for: probing horizon_signin_google then reusing its authorization code for signup. Google codes are single-use; obtain a fresh code after any uncertain exchange. Requires: a fresh Google authorization code and its exact redirect URI from the app's OAuth flow, plus the server's configured Google OAuth client. Side effects: exchanges the code once. signInIfExists omitted/false keeps strict signup semantics; true authenticates an existing Google identity. It does not link a different email/provider account. Returns: 201 user details and accessToken for new users or signInIfExists=true existing users, even without refresh opt-in. includeRefreshToken=true adds refreshToken and both expiry timestamps. The server derives the name from the Google email; use horizon_change_name later. Errors: 409 on an existing identity in strict signup mode or conflicting email. 400 for invalid provider data. Never automatically retry an uncertain exchange or reuse a spent code. Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"googleAuthorizationCode": "<googleAuthorizationCode>",
"googleRedirectUri": "<googleRedirectUri>"
},
"name": "horizon_signup_google"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| signInIfExists | No | Explicitly enable one-click Google registration/signin with one code exchange; omitted/false remains signup-only | |
| googleRedirectUri | Yes | Exact redirect URI used to obtain the Google authorization code; empty string for configured native flows (max 500 characters) | |
| includeRefreshToken | No | Explicit opt-in to a rotating 30-day refresh session; omitted or false preserves access-only behavior. Store refresh tokens in platform secure storage | |
| googleAuthorizationCode | Yes | Fresh single-use Google authorization code obtained by the player's OAuth consent flow (max 2000 characters) |