Gateway Registration
Gateways self-register with JKBMSR Cloud after they join Wi‑Fi. Owners then claim the gateway with a short claim code (label, serial log, or onboard deep link).
Gateway self-register
text
POST /api/v1/device/registerThe gateway sends its device ID, hardware ID, firmware version, and (on 0.1.4+) a claim code. The cloud stores a hash of the claim code and returns gateway tokens plus config.
Owner claim
text
POST /api/v1/user/devices/claimAuthenticated customer request:
json
{
"deviceId": "…",
"claimCode": "ABCD-EFGH"
}- Prefer
claimCodefor all current firmware. - Legacy
deviceSecretis accepted only for gateways registered before claim codes existed. - If email verification is enabled, the account must be verified first (403 otherwise).
- Claiming before the gateway finishes register returns 404 — retry after Wi‑Fi/register completes.
Browser path: sign in → flash → USB Wi‑Fi setup → automatic authenticated claim. The claim code remains proof of physical possession but is passed directly from the gateway to the signed-in browser instead of being typed by the user.