Unreal Engine — Client Setup

Client Setup

Calls shown via the official C++ SDK (compiled into your UE module). Blueprint projects: same endpoints over FHttpModule/VaRest — see Getting Started.

construct
Client client("YOUR_API_TOKEN");

Creates the SDK client. Optional second arg is the private admin token — dedicated-server builds only, never in a shipped client. HTTP goes through cpr/libcurl; on UE you may also use FHttpModule directly.

responses
response.success / response.error

Every call returns a response object — check success and read error on failure. API errors are returned, not thrown; transport failures surface as exceptions.

threading
// call from a worker thread or async task

SDK calls are blocking HTTP. In UE, run them on AsyncTask/UE::Tasks — never the game thread — and marshal results back for UI.

models
template / nlohmann::json

Player/room data fields are JSON — pass a struct with adl_serializer (see sdks/cpp Game.cpp) or raw nlohmann::json.