Skip to Content
CSGOWINAPI

Get your key

API v2 has its own key, made by switching - it comes with v2, which is not open yet. The key that works today is the v1 key.

API v2

Coming soon

API v2 is not open yet - every request to it answers 404 until it launches, and the details on this page may still change. Build on API v1 today - it keeps working. New keys and a one-step switch will arrive with v2.

API v2 key

API v2 has its own key, made by switching your account. One key covers every code you own. It reads your data and, if you choose, lets tools act for you (what that means).

  1. Open Profile > Affiliates > API key and press Switch to API v2. You need an affiliate code.
  2. Give the key a name if you like, for example the tool that will use it. Tick Let tools act for me only if a tool of yours must host giveaways, schedule periods or manage cases. It is off by default and needs two-factor authentication. If it is on, set the daily limit.
  3. Tick I understand this cannot be undone and press Switch and create key. If your account has two-factor authentication, enter a fresh code.
  4. The key is shown once, behind Reveal. It starts with cgw2_. Copy it into your password manager or your server's secrets, then press I have stored it. It is never shown again.
  5. Send it in the x-apikey header of every v2 request. Nowhere else: a key in a URL or a body is never read.

The switch cannot be undone

  • Your v1 key keeps working on the three v1 endpoints.
  • A code you create after switching gets no v1 key.
  • Revoking your v2 key does not undo the switch. You can generate a new one whenever you like.

Not switching costs you nothing: see what you keep.

Replace, revoke, change

  • Generate a new key - the old key stops at once. It asks for a two-factor code when your account has two-factor authentication.
  • Revoke key - the key stops at once. It asks for no code, so a leaked key is one click away from dead.
  • Change acting - turn the tick or the limit up or down. Turning them up asks for a code, turning them down does not.
  • The key has no expiry date. The dialog shows when it was last used, so you can spot a key nobody uses.
  • A v1 key sent to a v2 address answers 401 legacy_key.
  • Support can block API v2 on an account. A new key does not lift a block: it answers 403 key_blocked.

Keep it off stream

  • The dialog shows only the start of the key (cgw2_ and six characters) and when it was last used. Do not open the key screen on stream.
  • Call the API from your server, bot or overlay backend, never from a page your viewers load.
  • If a key may have leaked, revoke it first and sort it out after.

API v1

v1 key (legacy)

One key per affiliate code. It reads that code's leaderboard, raffles and stats on the three v1 endpoints, keeps working and does not expire. It is the key to use today. Once API v2 opens, new integrations should use a v2 key.

  1. Sign in on CSGOWIN and open the Affiliates dashboard.
  2. Press API key there, then Reveal, and copy the key.
  3. Your leaderboard and your raffles work with the key alone. Having a key does not switch on referral stats: that endpoint is opt-in per code and answers 401 External API not enabled for this affiliate until CSGOWIN switches it on for yours - ask Live Support on csgowin.com, giving your affiliate code.
  4. Send the key in the x-apikey header of every request. The quick start has a command to paste for each endpoint.

Keep it safe

  • Call the API from your server, bot or overlay backend - never from a page your viewers load, where anyone can read the key.
  • Never show the key on stream or paste it into chat.
  • If it leaks, ask support for a new one.

Open the Affiliates dashboard