Skip to content

Generate and save an Enhance API key

Generate this token in Enhance when you want to use ApiMachine website bulk tools. Ordinary cPFence protection does not require it.

  1. Sign in to your Enhance control panel.
  2. Open Settings → Access tokens → Create Token.
  3. Choose Super admin and create the token. Keep it private.
  4. If you restrict the token by IP, include the main control panel server’s actual outgoing addresses, including IPv6 when used. Check restrictions if validation fails.
  1. On the main control panel server’s WebUI, open Tools & Utilities → ApiMachine Bulk Tools → API key.
  2. Select Set a new key if a key is already saved, then enter the token privately.
  3. Select Save new API key, then check the validation result before running a bulk action.

Replace Enhance API Key form with an empty Enhance API Key field and Save new API key button.

Paste the token privately and save it. The screenshot leaves the key field empty; it does not show a submitted or validated token. Select the image to enlarge it; use your browser's Back command to return.

CLI alternative, from root on the main control panel server:

Terminal window
cpfence --set-enhance-api-key

Enter the key at the private prompt. cPFence validates it and stores the encrypted value locally. Keep the server’s configuration and your original token private.

Next, follow website selection and bulk-action steps. If validation fails, check the token role, IP restriction, Enhance API access, and cPFence license before contacting support.