Step 4 of 4

See your first player.

Run the example in your Godot project and check the response there.

GodotPrepare your projectChange
First player request in GodotGodot2:51
Open video separately ↗

Finish setup before confirming your first request. Connect

Attach the script to a Node and run the scene

GDScript
res://scripts/first_call.gd
horizOn call
1# Attach this script to a node in your main scene.
2extends Node
3​
4# horizOn: initialize, connect to the nearest server, sign in anonymously.
5func _ready():
6 # Step 1: Connect to server (auto-selects lowest latency host)
7 var connected = await Horizon.connect_to_server()
8 if not connected:
9 print("Failed to connect to horizOn server")
10 return
11​
12 print("Connected to: ", Horizon.getActiveHost())
13​
14 # Step 2: Quick sign in (restores session or creates anonymous account)
15 var signed_in = await Horizon.quickSignInAnonymous("TestPlayer")
16 if signed_in:
17 print("Signed in as: ", Horizon.getCurrentUser().displayName)

Here is what should happen

The anonymous player signs in successfully. Your Console, Output or terminal shows a successful response with a player name or userId. You can also check the player in the selected project’s Users area.

Confirm the result from your own project. Existing dashboard players do not prove this new connection.

Open Users
No response yet?

Check the active project key, JSON import and backend addresses. Restart your project after importing. For a 401, check the full key; for network errors, check the reachable backend address and console output.

Also: check the API in the dashboard

The API Explorer helps with debugging. Still verify the first request from your own game afterwards.

API Explorer1:05
Open video separately ↗
Open the API Explorer
Back