This guide explains the process of making a device claimable. When a device is claimable, someone else can claim the device in a secure manner.
- An application in a The Things Stack Cloud or The Things Stack Enterprise cluster. See instructions
In order for anyone to claim devices that are registered in your application, you need to authorize claiming. This is needed for The Things Stack to move the device out of your application. This needs to be done once, per application.
Command-line interface only
The instructions below use the command-line interface (CLI).
<app-id> with the Application ID of the application that you created in prerequisites, and run the following command in the CLI:
$ ttn-lw-cli applications claim authorize <app-id>
To undo the action:
$ ttn-lw-cli application claim unauthorize <app-id>
In order to make a device claimable, the device first needs to be added first in the application that has been authorized for claiming.
If you already have devices in your application that can be claimed, i.e. to transfer the ownership, you can go ahead to the next section.
If you don’t have a device in the application yet, you can add it by using one of the following ways:
- Add a device in The Things Stack
- Register a device on The Things Join Server (i.e. not in a Network Server or Application Server yet)
- Import ATECC608A Secure Elements on The Things Join Server. Make sure to enable the Set claim authentication code option
When your device is added in The Things Stack, you can go ahead and configure claiming settings. This is comprised of a claim authentication code and a validity window. The claim authentication code is a secret value. The validity window is an optional start and end date on which the claim authentication code can be used.
Go to your application in The Things Stack Console. Go to End devices in the left menu and find the device you want to configure for claiming.
Find the claiming settings in the Claiming tab:
To save the claiming settings you edited, click Save changes.
To disallow claiming, click Delete claim authentication code.
To configure claiming using the CLI, use the following command:
$ ttn-lw-cli end-device <app-id> <device-id> --claim-authentication-code.value ABCD \ --claim-authentication-code.valid-from 2021-03-01T00:00:00Z \ --claim-authentication-code.valid-from 2021-03-31T23:59:59Z
This sets the secret claim authentication code to
ABCD, that can be used in March 2021.
Generate QR Code for Claiming
You can use QR codes to make claiming really easy. The QR code includes the unique identifiers of the device as well as the secret claim authentication code.
Learn how to Generate QR Codes