All languages at a glance
A concise side-by-side of the referral flow across PHP, Node/JS, Python, .NET/C#, and cURL — pick your stack, then jump to the full SDK guide.
This is the one-screen overview: the same three calls in every supported
stack, so you can see the shape of the integration before committing. Each tab is
deliberately minimal — for the complete, copy-paste version with error handling,
the mmref capture, and a worked example, jump to your stack's full guide:
PHP
Single-file drop-in (vote-callback style).
Node / JS
One module, fetch + node:crypto.
Python
Stdlib only — hmac + hashlib.
.NET / C#
HMACSHA256 + HttpClient.
cURL
No SDK — sign + POST from the shell.
The flow is always the same three steps against
POST /api/referral/events:
- Capture the
mmreftoken at registration. - Report
registeredto mint the anchor (first-touch). - Report
qualifiedat your milestone — then grant the reward in-game.
Every snippet builds the JSON body once, signs it with HMAC-SHA256 over
"<t>.<rawBody>", and POSTs it with the
X-MMOLove-Signature: t=<t>,v1=sha256=<hex> header.
Sign the exact body string you send — don't re-encode it after signing. That's the #1 integration bug.
The signing core, side by side
This is the bit every stack must get right: HMAC-SHA256 over "<t>.<rawBody>",
lower-case hex, in the X-MMOLove-Signature header.
$t = time();
$mac = hash_hmac('sha256', $t . '.' . $raw, $secret);
$sig = "t={$t},v1=sha256={$mac}"; // X-MMOLove-SignatureReporting an event, side by side
The registered call (the qualified call is identical bar the event name and a
new server_event_id):
mmolove_send_event($SECRET, $SERVER_ID, 'registered', [
'token' => $mmref,
'referee_identity' => $playerId,
'server_event_id' => 'reg-' . $playerId,
]);Then go deep
Ready to wire it for real? Each guide is a complete, copy-paste integration:
Your signing secret is server-side only — never ship it to the browser or a game client. Sign on your backend.
cURL
Integrate the Referral Kit with no SDK — sign and POST events from the shell with openssl + curl, including a reusable Bash helper and full worked examples.
Vote badge
Embed the live "Ranked on MMOLove" vote badge — a self-updating SVG showing your hearts and rank, wrapped in an attributed backlink.