20% offevery plan

Black Friday Sale. New purchases, extensions and upgrades all qualify.

Ends in
00days
00hrs
00min
00sec
See plans
API

API keys and the IP whitelist

Create up to five named API keys, copy each one once, revoke them, and lock them all to up to five IP addresses.

Create your keys

  1. Open the API tab

    Go to Settings → API. It is there on every paid plan and only for the account owner: a sub user cannot see or manage keys. The line under API Keys shows your tier and your rate limit.

  2. Name it and create it

    Type a name that says where the key will be used, like Sell script, and click Create key. A window opens with the new key hidden as dots.

  3. Copy it now

    Click Copy, paste the key into your password manager or your server’s secret storage, then click Done. The key is shown only this once.

Settings → API with two keys and the IP whitelist switched on.
Settings → API with two keys and the IP whitelist switched on. Click to enlarge.

What a key looks like

A key is always 64 characters: the prefix cc-api- followed by 57 random capital letters and digits.

cc-api-7Q2MZK4P9XW3B8RDT6VHN5LCJ1YFG0AESU2K9MD4PX7RB3WT6ZQ8HN5VC

That is an example, not a real key. Afterwards the API tab lists each key by name with only its last four characters, like cc-api-********N5VC, plus when it was created and last used.

Send the key

Put the key in the Authorization header of every request, after the word Bearer and a space. The key is case sensitive.

curl https://dashboard.consoleclient.com/api/v1/accounts \
  -H "Authorization: Bearer cc-api-YOUR_KEY_HERE"

Never send the key in the URL or in the request body. URLs end up in logs and browser history.

Up to five keys, and revoking

Give each script, tool or server its own key. You can tell them apart by their last used time, and revoking one does not touch the others.

RuleDetail
NamesUp to 40 letters, numbers, spaces and . _ - ( ) # : +, starting with a letter or number. Each name can be used once.
RevokeClick Revoke next to a key and confirm. The key stops working at once: anything still using it gets invalid_api_key. Your other keys and the IP whitelist are not affected. It cannot be undone.
Replace a keyCreate a new key, switch your script over, then revoke the old one. Nothing stops working in between.
Shared limitsAll your keys share one rate limit and one in-flight limit, so a second key never adds requests. See Errors and rate limits.
Full listWith five keys, revoke one before you create another.

If your plan lapses, your keys are kept but every request is refused until you renew, with tier1_required, tier2_required or tier3_required depending on the tier the endpoint needs. You can still revoke keys meanwhile. After a downgrade, areas the new tier does not include answer tier2_required or tier3_required, and the lower limits apply from the next request.

The IP whitelist

The IP whitelist is the best protection for your keys. Use it whenever your requests come from a fixed address, such as a VPS. One list covers all your keys: while it is on, a request from any other IP is refused with ip_not_allowed, even with a valid key.

  1. Find the right IP

    You need the public IP of the machine that sends the requests, not a local address such as 192.168.x.x. On a Linux server, curl ifconfig.me prints it.

  2. Add it

    Type the address and click Add IP. IPv4 and IPv6 both work. Nothing is added automatically.

  3. Switch the whitelist on

    Turn on Only Accept Requests From the IPs Below. It applies from the next request.

RuleDetail
Up to 5 IPsThe counter next to the heading shows how many you use. Remove one to make room.
IPs are hiddenAn added IP is shown masked, for example 20*.***.***.25. Console Client stores a keyed fingerprint and the masked label, never the address itself, so nobody can read the full IP back.
No editingTo change an IP, click Remove and add the new address.
Single addressesEach entry is one exact address. Ranges and CIDR blocks are not supported. Many hosts rotate IPv6 addresses inside their block, so prefer the server’s IPv4 address when it has one.
On but emptyWith the whitelist on and no IPs on the list, every request is refused. The tab warns you.
Turning it offSwitch it off whenever you like, for example on a home connection whose IP changes. Your list is kept.

Wrong keys and lockouts

A failed attempt is a request with a wrong or malformed key, or with a valid key from an IP that is not on your whitelist. After 20 failed attempts from one IP inside 10 minutes, further failed attempts from that IP answer too_many_failed_attempts with a Retry-After header until the 10 minutes are up. A request with the right key from an allowed IP is never locked out, so fixing the key in your script is enough.

If a key leaks

  1. Revoke it

    Open Settings → API and click Revoke next to the leaked key. It stops working at once. Then create a new key for the script that used it.

  2. Check your accounts

    Look at Overview and Chat → Console for anything you did not do, and check that Settings → Connection still points at your server.

  3. Turn on the whitelist

    If it was off, add your server’s IP and switch it on, so the next leak cannot be used.

  4. Clean up the leak

    Delete the message, rotate the repository secret or rewrite the git history. Treat the old key as public forever.

Good practiceWhy
Keep the key in an environment variable or a secrets manager.Keys written into code end up in git, screenshots and pastes.
Never post the key in Discord, a ticket or a stream.Console Client staff never ask for it.
Replace a key when someone who had access leaves.Create a new key, update your script, then revoke the old one.
Need a hand?

Check the troubleshooting guide or return to all guides.