Reset devices

You can reset the devices of a license using the SDK. Here is an example of how to reset the devices:

import { Keyforge } from 'keyforge-js';
 
const keyforge = new Keyforge('sk_1234');
 
const license = await keyforge.licenses.resetDevices(
  'ABCDE-ABCDE-ABCDE-ABCDE-ABCDE'
);

Parameters

PropTypeDefault
key
string
-

Returns

Here is an example of the returned license object:

{
  "key": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
  "userId": "05d27bfb-61c7-45f7-9d07-09a41defc88a",
  "productId": "p_123456",
  "type": "perpetual",
  "expiresAt": null,
  "revoked": false,
  "email": "[email protected]",
  "maxDevices": 2,
  "activeDevices": [],
  "createdAt": "2024-05-19T18:39:33.000Z"
}

On this page