List products

You can list all of your products using the SDK. Here is an example of how to list products:

import { Keyforge } from 'keyforge-js';
 
const keyforge = new Keyforge('sk_1234');
 
const products = await keyforge.products.list();

Returns

Here is an example of the returned product object array:

[
  {
    "id": "p_123456",
    "userId": "05d27bfb-61c7-45f7-9d07-09a41defc88a",
    "name": "My product",
    "description": "My product description",
    "supportEmail": null,
    "portalShow": true,
    "portalAllowDeviceReset": true,
    "createdAt": "2024-05-19T04:31:03.000Z"
  },
  {
    "id": "p_789123",
    "userId": "05d27bfb-61c7-45f7-9d07-09a41defc88a",
    "name": "My second product",
    "description": "",
    "supportEmail": "[email protected]",
    "portalShow": true,
    "portalAllowDeviceReset": false,
    "createdAt": "2024-04-26T01:01:32.000Z"
  }
]

On this page