Skip to main content
Create an API key from the Developers page of the Sudo Dashboard.

How to create an API key

  1. Log in to the Sudo Dashboard and click on Developers.
  2. Select API Keys, then click Create API Key.
2880
  1. Enter the key’s Name, Validity Period, and optional IP Address.
  2. Click Create API Key.
  3. Copy the API key. It is shown only once and cannot be retrieved later.
2880
If an IP address is provided, only requests originating from that IP will be allowed. If no IP is provided, requests from any IP will be allowed.

IP allowlist

The IP allowlist restricts an API key to approved IP addresses or ranges. Each request is checked against the public IP address it reaches Sudo from. To add more than one entry on the dashboard, separate them with commas. A request is allowed if it matches any one of the entries.

Supported IP Formats

Sudo supports the following IP formats for flexibility and security:
Some servers can reach Sudo over both IPv4 and IPv6. If yours can, add both addresses, or requests sent over the one you left out will be rejected with 403 Access Restricted: IP not allowed!. If your IPv6 address changes often, whitelist its range, for example its /64, instead of a single address.
If you think an API key is compromised, delete it from the API keys table and create a new one.