Link Guest Account to Apple
horizon_link_appleConverts a signed-in guest player into an Apple account while preserving the same user ID, verifying the Apple identity token and keeping the current session active.
Instructions
Converts a signed-in guest player into an Apple account while keeping the same user ID. Use when: a guest player completes Apple Sign-In and explicitly chooses to link the account. Not for: new players (use horizon_signup_apple), existing apple accounts (use horizon_signin_apple) and accounts that are not guests. Requires: a signed-in guest player: the userId and current accessToken from horizon_signup_anonymous or horizon_signin_anonymous. Side effects: verifies the identity token and turns the guest into an APPLE account with the same userId. The current session keeps working and the guest anonymous token is deleted on the server. Returns: 200 with userId, appleUserId, isPrivateRelayEmail, isAnonymous: false, isVerified and authStatus: AUTHENTICATED. Use horizon_signin_apple on other devices. Errors: 409 when the Apple account already belongs to another account or the account is not a guest: do not retry, ask the player. 401 for an invalid session: sign in again. 400 for invalid input. 404 or 403 for other failures. 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": {
"userId": "<userId>",
"sessionToken": "<sessionToken>",
"appleIdentityToken": "<appleIdentityToken>"
},
"name": "horizon_link_apple"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Player user ID (UUID) from the result of horizon_signup_* or horizon_signin_* | |
| sessionToken | Yes | Player accessToken from signup, signin or refresh-session, passed as sessionToken (max 256 characters) | |
| preferredLanguage | No | Optional language code for the account, such as en or de (max 10 characters) | |
| appleIdentityToken | Yes | Apple identity-token JWT obtained after player consent, with audience matching this project's configured Services ID or Bundle ID |