Skip to content

How do I rotate and copy a device key?

Every device has an API key that proves to the platform that its readings are genuine. Here you issue a new key for a device, for example if the key is lost or you think it leaked.

  • Role needed: Admin or Owner.
  • Where it is available: web.
  • Own key or shared key: each device card has a badge: own key (the device has its own key) or shared key (it uses the shared master key). Rotating gives the device its own key.
  1. Sign in (see How do I sign in to my farm?).
  2. Press Devices in the side menu. On a phone, it is in the bar at the bottom of the screen.
  3. Find the device card under “📡 Devices”. The Rotate Key button is in the row of buttons below it.

The side menu: press Devices (1) to open the Devices page.

  1. Press Rotate Key on the device card.

A device card: the “own key” or “shared key” badge (1) and the Rotate Key button (2).

  1. A confirmation asks if you want to issue a brand-new key. Confirm.
  2. A window shows the new key. Press Copy API key and keep it somewhere safe. It will not be shown again.

The new-key window: the Copy API key button (1) and the Close button (2). The key is shown only this once.

  1. Flash the device with the new key (upload the program to the board again).

Rotating never cuts the device off. The old key and the shared master key keep working until you flash the device with the new key, so it does not go quiet in the meantime.

  • Copy the key before closing the window. If you closed it, rotate again.
  • If automatic copy fails, select the key in the field and copy it by hand.
  • Do not share the key in public messages or screenshots.

I closed the window before copying the key. Rotate the key again to get a new one.

I do not see the Rotate button. Your role is Viewer. The button shows only for Admins and the Owner.

I rotated the key and the device still sends. That is expected: the old key keeps working until you flash the new one.

Did this article answer your question?