Account

πŸ“¦ Automate Steam Login Process

Baseurl: https://www.steamwebapi.com/steam/api/steamloginsecure

    πŸ’¬ **What this endpoint does:**
    - Automates your Steam login process, including for trading, market, and other Steam Community features.
    - With the `steamLoginSecure` cookie, you can use our Trading API and build easy-to-use trading bots, market trackers, and more.

    πŸ› οΈ **How to use:**
    There are **two ways to authenticate**:

    1. **Username + Password Login**
       - Send a POST request with your Steam `username` and `password` in the request body.
       - If your account is protected by Steam Guard, include the `code` parameter from your mobile authenticator.

    2. **Refresh Token Login**
       - Instead of username/password, you can provide a `steamrefreshtoken` (JWT).
       - This token is returned after the initial login and allows you to request a fresh `steamLoginSecure` cookie without needing to re-enter credentials.

    🚨 **Important Note:**
    - Do **not** provide both login credentials and `steamrefreshtoken` at the same time.
    - One of the two options must be present, not both.

    🌐 **Additional Info:**
    - The login process is handled securely. No password is stored server-side.
    - This endpoint is ideal for building:
      - Trading bots
      - Market analyzers
      - Automated session checkers

    πŸ“¦ **Response:**
    - On success, you will receive the following cookies:
      - `steamLoginSecure` – required for authenticated Steam Community actions
      - `sessionid` – required for most web interactions
      - `browserid` – identifies the browser/session
      - `steamrefreshtoken` – reusable token to fetch new `steamLoginSecure` cookies later

    πŸ•’ **Token Lifespan**
    - The `steamrefreshtoken` is typically valid for **up to 6 months**
    - It can be used repeatedly to retrieve new `steamLoginSecure` cookies without logging in again.
post/steam/api/steamloginsecure

Request

  • Base URL: https://www.steamwebapi.com
  • URL: https://www.steamwebapi.com/steam/api/steamloginsecure
  • Auth: API key in query parameter key

Request body

usernamestring

Your Steam username (optional if steamrefreshtoken is provided)

passwordstring

Your Steam account password (optional if steamrefreshtoken is provided)

codestring
  • optional - Steam Guard code (optional, only if Steam Guard is enabled)
steamrefreshtokenstring

optional, this you will get after first login - This is the second auth method - A long-lived refresh token (JWT) that can be used to request a new steamLoginSecure at any time.

Example request

{
  "username": "user123",
  "password": "password123",
  "code": "123456",
  "steamrefreshtoken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Response

Successfully logged in to Steam. Cookies are returned.

successboolean
messagestring

Example response

{
  "success": true,
  "message": "Successfully logged in to steamcommunity.com",
  "cookies": {
    "steamloginsecure": "steamLoginSecureToken...",
    "steamloginsecureexp": "2025-04-01T12:00:00+00:00",
    "steamrefreshtoken": "steamId||refreshToken...",
    "sessionid": "xyz123",
    "browserid": "abc456",
    "steamid": "76561198000000000"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.