Managing Kion App API Keys


Managing Kion App API Keys

The Kion public API enables you to programmatically interact with Kion. This requires a Kion app API key that is generated within Kion.

Configuring API Access Settings

To enable the generation of App API Keys by users, enable it in the Kion global settings. With this setting enabled, administrators can generate their own App API Keys. Non-admin users will not be able to generate keys until they are explicitly given permission.

To enable API key generation:

  1. Navigate to Settings > System Settings.
  2. Under Application Settings, select App API Access.
  3. Enable the App API Key Generation option.
  4. Set the API Key Limit Per User to the maximum number of keys a single user can generate. The minimum value is 1, and the maximum value is 10.
    • If you set the key limit to a value that is less than the number in use by a user, you will get an alert that says App API Key limit per user must be at least [value]. Click Learn More for the option to Download User API Key Report, which shows you which users have more keys than the number specified. Reduce their API keys to adjust the key limit.
  5. Configure the App API Key Lifespan if you want the app API keys to automatically expire after a certain number of days. Users will receive notifications a few days prior to their keys expiring.
  6. Click Update App API Access Settings to save the settings.

Administrators will now see a new option on the user menu at the top right corner of the screen called App API Keys.


Granting Users Permission to Generate App API Keys

By default, only admin users are allowed to generate app API keys. You can assign additional users permission through permission schemes.

You can choose to assign this permission by updating the global permissions scheme or by creating a custom permissions scheme. Here, we will go over how to update the global scheme. For information about custom schemes, see Add a Custom Permission Scheme.

To add the permission to roles in the global permission scheme:

  1. Navigate to Settings > Permissions.
  2. On the Global Permissions Scheme, click the ellipsis menu and select Edit.
  3. Assign the Manage Own App API Keys permission to any desired roles.
  4. Click Update Permission Scheme.

To assign users to a permission role:

  1. Navigate to Settings > Permissions.
  2. Select the Global Permissions tab.
  3. Locate a role that you have assigned Manage Own App API Keys to.
  4. Assign users or user groups to the role.
  5. Click Save.

For more information about assigning permissions to users, see Getting Started with Permissions

Generating an App API Key

  1. Click the user menu in the top right corner of Kion and select App API Keys.
  2. Click Add.
  3. Enter a name for your app API key.
  4. Click Create App API Key.
  5. Click anywhere in the App API Key field to copy the token to your clipboard.

Store this token in a secure location. You cannot view the token again after closing this modal.

You can now use this token to send requests via the Kion public API. The app API key must be added to a request header with a name of Authorization and a value in this format: Bearer YOURTOKENHERE.

What Next?