API Keys

API Keys

With an API key, a program can use the Centova Cast API on behalf of your account, without your password. For example, a script on your web site can use an API key to read the metrics of your stream or to start your autoDJ. Each key has its own permissions and an optional expiry date.

To open the API Keys page, click API keys under the Account menu icon in the navigation menu. The page shows only the keys of your own account.

A DJ can also open this page. A DJ sees and manages only the keys of the DJ account. For more information, see the Keys of a DJ Account section of this page.

This manual does not describe the API itself.

Key List

The list has these columns:

  • Key
    Shows the start of the key, for example cck-abcd1234.... The start of the key identifies it. Centova Cast never shows the full key again after it creates the key.

  • Description
    Shows the description of the key. Below the description, the column shows the permissions of the key.

  • Created
    Shows the date on which you created the key.

  • Expires
    Shows the date on which the key stops working, or Never.

Note: On narrow screens, the control panel does not show the Created column. On very narrow screens, it also does not show the Key and Expires columns.

To show only the keys that contain a keyword, type the keyword in the search box on the toolbar.

Creating a Key

To create an API key:

  1. Click New key on the toolbar, or press the Insert key. The editor opens.
  2. Type a description, and set the expiry date and the permissions.
  3. Click Save. The API key dialog opens and shows the new key.
  4. Click the clipboard icon, or click the key, to copy the key to the clipboard.
  5. Paste the key into the program that will use it, or into a safe place.
  6. Click Close.

IMPORTANT: Copy the key before you close the dialog. Centova Cast shows the full key only one time. You cannot show it again or recover it. If you lose the key, delete it and create a new key.

CAUTION: Keep the key as secret as your password. Each person or program that has the key can use your account with the permissions of the key.

The editor has these fields:

  • Description
    Specifies a description of the key, for your reference. Use it to remember which program uses the key. The default is New API key. This field is required.

  • Expires
    Specifies the date on which the key stops working. If this field is empty, the key works until you delete it, and the list shows Never. You cannot set a date in the past.

  • Permissions
    Specifies what the key can do. The options are:

    • Full access
      The key has all of the permissions of your account. If your permissions change, the permissions of the key change too.

    • The permission list
      If you clear the Full access box, a list field shows. Select each permission that the key must have. If you select no permission, the key can do nothing. The list shows the permissions in groups. Type a part of a name to search the list.

    The permission list contains these permissions:

    • Accounts group
      Manage DJ accounts. With this permission, the key can manage the DJ accounts of your station.

    • Maintenance group
      View logs and Back up and restore accounts. With Back up and restore accounts, the key can make, download and restore the backups of your account.

    • Management group
      Manage own profile and settings. With this permission, the key can read and change the profile of your own account.

    • Stream group
      Start/stop the stream, Start/stop the autoDJ and Manage playlist settings.

    • Media group
      Access media library and Manage media files.

    • Reporting group
      View metrics and View listeners.

A key can never do more than your account can do. If your account loses a permission, each key of your account also loses it.

Note that a key cannot log in to the file server. FTP, SFTP and WebDAV connections always need your username and your password.

Example: A script on your web site must show the number of listeners of your stream, and nothing more. Create a key with the description Web site listener count. Set Expires to the end of the year. Clear Full access and select only View listeners. If the key is stolen, the thief can only read your listener information, and only until the end of the year.

Editing and Deleting Keys

To edit a key, click its row in the list. You can change the description, the expiry date and the permissions. You cannot see or change the key itself. Click Save to save the changes.

To delete keys:

  1. Select one or more keys in the list.
  2. Click Delete on the toolbar, or press the Delete key.
  3. Click Yes in the confirmation dialog.

A deleted key stops working immediately.

Keys of a DJ Account

A DJ creates, edits and deletes the keys of the DJ account on the same page, in the same way. A key of a DJ account acts on behalf of the DJ, not on behalf of your account.

The permission list of a DJ shows only the permissions that you gave to the DJ account. A key of a DJ account can never do more than the DJ can do. If you remove a permission from the DJ account, each key of that DJ account also loses it. For more information about DJ permissions, see the DJ Management section.

You cannot see or delete the keys of your DJs.