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
Open the API tab
Go to Settings → API. The tab is available on every paid plan, from Tier 1 up, and only to the account owner: a sub user cannot see or manage the keys. The Your plan panel at the top shows your tier, your rate limit and which areas of the API your plan includes.
Name it and create it
Type a name that says where the key will be used, such as Sell bot or VPS, and click Create key. A window opens with the new key hidden as dots and a Copy button.
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. When the window closes it is gone from the page for good.
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-7Q2MZK4P9XW3B8RDT6VHN5LCJ1YFG0AESU2K9MD4PX7RB3WT6ZQ8HN5VCThat is an example, not a real key. Afterwards the API tab lists each key by its name with only the last four characters, such as cc-api-********N5VC, along with when it was created and when it was 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"Do not 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
You can have up to five keys at the same time. Give each script, bot or server its own key: you can tell them apart by their last used time, and revoking one does not touch the others.
| Rule | Detail |
|---|---|
| Names | Up to 40 letters, numbers, spaces and . _ - ( ) # : +, starting with a letter or number. Each name can be used once. |
| Revoke | Click Revoke next to a key and confirm. The key stops working in the same moment: anything still using it gets invalid_api_key. Your other keys and your IP whitelist are not affected. Revoking cannot be undone. |
| Replace a key | Create a new key, switch your script over to it, then revoke the old one. Nothing stops working in between. |
| Shared limits | All your keys share one rate limit and one in-flight limit, so a second key never adds requests. See Errors and rate limits. |
| Full list | With five keys, revoke one before you can create another. |
If your plan lapses, your keys stay stored but every request answers tier1_required until you renew; you can still revoke keys in the meantime. If your plan moves to a lower tier, calls to 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 single best protection for your keys, and it is recommended for everyone whose requests come from a fixed address such as a VPS or a dedicated server. One list covers all your keys. When it is on, a request is accepted only if it comes from one of the IPs on your list. A request from anywhere else is refused with ip_not_allowed, even with a valid key.
Find the right IP
You need the public IP of the machine that sends the requests, not your home PC unless that is where the script runs, and not a local address such as 192.168.x.x. On a Linux server,
curl ifconfig.meprints it.Add it
Type the address into the box and click Add IP. IPv4 and IPv6 are both accepted. Nothing is added automatically: only addresses you type are trusted.
Switch the whitelist on
Turn on Only accept requests from the IPs below. The change applies to the very next request.
| Rule | Detail |
|---|---|
| Up to 5 IPs | The counter next to the heading shows how many you have used. Remove one to make room. |
| IPs are hidden | As soon as you add an IP it is shown masked, for example 94.***.***.13, with only the first two and last two digits visible. Console Client stores a keyed fingerprint of the address and the masked label, never the address itself, so the full IP cannot be read back by anyone. |
| No editing | An IP cannot be edited once added. To change one, click Remove and add the new address. |
| Single addresses | Each entry is one exact address. Ranges and CIDR blocks are not supported. If your server uses IPv6, note that many hosts rotate the address inside their block, so prefer the server’s IPv4 address when it has one. |
| On but empty | If the whitelist is on with no IPs on the list, every request is refused. The tab warns you when this is the case. |
| Turning it off | Switch it off whenever you like, for example if your requests come from a home connection whose IP changes. Your list is kept for when you switch it back on. |
Wrong keys and lockouts
A failed attempt is a request with a wrong or malformed key, or a request with a valid key from an IP that is not on your whitelist. After 20 failed attempts from the same IP inside 10 minutes, further failed attempts from that IP are refused with too_many_failed_attempts until the 10 minutes are up, and the response carries a Retry-After header. A request with the right key from an allowed IP is never locked out, so if a script of yours keeps sending an old key, fixing the key is enough.
If a key leaks
Revoke it immediately
Open Settings → API and click Revoke next to the leaked key. It dies at once. Then create a new key for the script that used it.
Check your accounts
Look at the Overview and at Chat → Console for anything you did not do, and check Settings → Connection still points at your server.
Turn on the whitelist
If it was off, add your server’s IP and switch it on so the next leak cannot be used.
Remove the key from wherever it leaked
Delete the message, rotate the repository secret, or rewrite the git history. Treat the old key as public forever.
| Good practice | Why |
|---|---|
| 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 will never ask for it. |
| Use the IP whitelist. | A key that only works from your server is worth nothing to a thief. |
| Use one key per script or server. | A leak then costs you one key, and the last used time shows which script is still calling. |
| Replace a key when someone who had access leaves. | Create a new key, update your script, then revoke the old one. |
Check the troubleshooting guide or return to all guides.