Get license

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

import { Keyforge } from 'keyforge-js';
 
const keyforge = new Keyforge('sk_1234');
 
const license = await keyforge.licenses.get('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": [
    {
      "identifier": "some_device_id",
      "name": "My computer name",
      "activationDate": "2024-05-19T18:39:33.000Z"
    }
  ],
  "createdAt": "2024-05-19T18:39:33.000Z"
}

On this page