Developer API

Steam Guard API

The Steam Desktop Authenticator — as a stateless API. Generate maFiles, mint Steam Guard codes, and auto-confirm trades straight from your backend. No desktop app to run.

Endpoints

All endpoints return JSON, accept the same auth header, and degrade with a normalised error envelope.

POST /steam/api/guard/code
POST /steam/api/guard/add
POST /steam/api/guard/remove
POST /steam/api/guard/confirmations/list
POST /steam/api/guard/confirmations/details
POST /steam/api/guard/confirmations/confirm
POST /steam/api/guard/confirmations/confirm-all

Steam Guard API — quickstart

Same auth header as every other endpoint we ship. Get an API key from the dashboard and you're querying inside two minutes.

  • Single auth header, JSON response.
  • Rate limits scale with your plan tier.
  • Full schema in the API reference.
API Request
# curl (POST + JSON body)
curl -X POST "https://www.steamwebapi.com/steam/api/guard/code?key=$KEY" \
-H "Content-Type: application/json" \
-d '{ ... }' # body fields: see the API reference
# Node.js
const r = await fetch(`https://www.steamwebapi.com/steam/api/guard/code?key=${KEY}`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ /* ... */ })
});
const data = await r.json();

About this API

The Steam Guard API is the Steam Desktop Authenticator rebuilt as a REST API. For years, bot operators ran Jessecar96's open-source SteamDesktopAuthenticator (SDA) desktop app to store maFiles and confirm trades by hand. You no longer need that desktop app — every step is a stateless HTTP call you can run from a server, a cron job, or a trading bot.

Replace the Steam Desktop Authenticator (SDA)

The maFile this API generates is byte-for-byte compatible with the SDA format, so anything you already built around SteamDesktopAuthenticator keeps working. The difference: no GUI, no Windows process, no manual clicking. Enroll an authenticator, generate the 5-character Steam Guard login code, and approve mobile confirmations entirely over the API.

Generate a maFile via API

maFile generation is a single endpoint, /steam/api/guard/add, that walks the Steam enrollment in two to three calls: log in with username and password, submit the email code Steam sends (for email-Steam-Guard accounts), then finalize with the activation code. The response is the full maFile — shared_secret, identity_secret, revocation_code, serial_number, the otpauth URI — plus a ready-to-use download link. Store the revocation_code: it is the only way to remove the authenticator later.

shared_secret, identity_secret & steamLoginSecure

The shared_secret generates the rotating Steam Guard login code (TOTP) via /steam/api/guard/code. The identity_secret signs mobile trade and market confirmations. steamLoginSecure is a web session cookie — it is not part of the maFile, but you can mint it from the maFile's RefreshToken to drive confirmation calls. One enrollment hands you everything a bot needs.

Automate a Steam trade bot

Wire the Steam Guard API into a trade bot: generate the login code on demand, then list and approve the trade confirmations Steam would normally show only in the mobile app — no phone in the loop, no human tapping Confirm. Pair it with the Steam Trading API for a full preflight-to-confirm pipeline.

Automate mobile (trade & market) confirmations

List pending confirmations, inspect one, accept or deny a single item, batch many, or one-shot auto-confirm every trade or market confirmation in a single request. All you need is the identity_secret and a steamLoginSecure session.

Works without a phone number

Accounts without a phone work too: Steam emails the activation code instead of sending an SMS, and the API finalizes enrollment with it the same way. Verified end to end.

Stateless and secure

Nothing is stored. You pass the secrets per request and they live only for that call — no maFile, no shared_secret, no session is ever persisted on our side. Every guard endpoint is POST, so secrets never land in a URL or an access log. Access is shared with the Trade API tier.

FAQ

Do I still need the Steam Desktop Authenticator (SDA)?

No. The Steam Guard API replaces the SDA desktop app — maFile generation, Steam Guard login codes and trade confirmations are all REST calls. The maFile it returns uses the same format as Jessecar96's SteamDesktopAuthenticator, so you can still import it if you ever want to.

How does the Steam Guard API replace SteamDesktopAuthenticator?

Everything the desktop app does by hand becomes an HTTP call: enroll an authenticator, download the maFile, generate the rotating Guard code, and approve mobile confirmations — scriptable, headless and stateless.

How do I generate a maFile via API?

Call /steam/api/guard/add with username and password, submit the email code Steam sends, then finalize with the activation code. You get the full maFile back — shared_secret, identity_secret, revocation_code and a download link — in one flow.

How do I get shared_secret, steamLoginSecure and a maFile?

All three come from enrollment: the maFile contains shared_secret and identity_secret; steamLoginSecure is minted from the maFile's RefreshToken. The shared_secret then powers /steam/api/guard/code for login codes.

How do I automate a Steam trade bot?

Generate the Steam Guard login code from the shared_secret, then auto-approve trade confirmations over the API — no phone, no manual tapping. Combine it with the Steam Trading API for eligibility and lock-state checks.

How do I automate mobile confirmations?

Use /steam/api/guard/confirmations/list to list them and /steam/api/guard/confirmations/confirm-all to approve every trade or market confirmation at once. You need the identity_secret and a steamLoginSecure session.

Does it work for accounts without a phone number?

Yes. For phone-less accounts Steam emails the activation code instead of an SMS, and the API finalizes enrollment with it the same way.

Is it secure? Do you store my secrets?

No secrets are stored. You pass them per request, they are used only for that call, and every endpoint is POST so nothing sensitive lands in a URL or an access log.

How do I generate Steam Guard login codes (2FA) from a shared_secret?

Send the shared_secret to /steam/api/guard/code and get the current 5-character Steam Guard code (TOTP) plus its expiry — the same code the Steam mobile app shows.

Start building with the Steam Guard API

One key, every Steam endpoint.