Skip to main content

Register a device by code

The install command the Register Device dialog gives carries a short activation code (?code=XXXX-XXXX at the end of its address) rather than a long enrollment token. Because the code is a few characters, it can also be read out or typed on a device where pasting is awkward, such as a phone, a kiosk or a machine reached over a serial console.

Mint a code​

Open Devices, then Register Device. The dialog mints a code when it opens and shows the install command that uses it. The code enrolls one device and expires in 30 minutes; the Reusable, many devices switch gives a command many devices can use instead. From the CLI:

clika-cli enrollment-codes create --body '{}'

From an MCP client, post_enrollment_codes with an empty body does the same, and get_install with the code and the operating system returns the install command that uses it.

Use it​

Run the dialog's command on the device, or install the agent and give it the code when it asks. The device appears in the list within a minute, like a token enrollment, and is then an ordinary device of the organization.

A code can name an entitlement profile, so devices enrolled with it start with that profile's grants; see Runtime licenses.

Codes and tokens​

An enrollment token, minted with clika-cli enrollment-tokens create, enrolls a device the same way (Add your first device shows the two commands). A device enrolled with a code runs benchmarks and deployments like one enrolled with a token.