Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Read Under Images!

image image

Steam Deck Rewards CLI

A simple Python command-line utility to register and claim Steam Deck profile rewards directly through the Steam API using ILoyaltyRewardsService#RegisterForSteamDeckRewards.

Built using steamcommunitykit for Steam authentication and authenticated Steam Community sessions.

Prerequisites

  • Python 3.8+
  • A Steam account
  • A Steam Deck eligible for profile rewards
  • The Steam Deck serial number
  • The Steam Deck controller code

Installation

Clone the repository:

git clone https://github.com/YOUR_USERNAME/Steam-Deck-Rewards-CLI.git
cd Steam-Deck-Rewards-CLI

Install the required dependencies:

pip install requests steamcommunitykit

Alternatively:

python -m pip install requests steamcommunitykit

Usage

Run the CLI:

python Demo.py

You will be prompted for your Steam account credentials:

* Username:
* Password:

After successfully authenticating:

* Logged into example_account

* Applying to [7656119XXXXXXXXXX]

Enter your Steam Deck information:

* Device Serial Code:
* Controller Code:

Example:

* How to use
 * - Login to steam
 * -- Enter Your Serial Code from Steam Deck
 * --- Enter Your Controller Code from Steam Deck
 * ---- Result

* Username: example_account
* Password: ********

* Logged into example_account

* Applying to [7656119XXXXXXXXXX]

* Device Serial Code: XXXXXXXXXXXXX
* Controller Code: XXXXXXXXX

* Register | Success

How It Works

1. Steam Login

The program authenticates using SteamClient from steamcommunitykit:

self.client.login_to_community(username, password)

An authenticated Steam Community session is then created:

session = self.client.build_community_requests_session()

2. Authentication Token

The authenticated session contains the steamLoginSecure cookie:

steam_login_secure = session.cookies.get("steamLoginSecure")

The value is URL-decoded and separated into the SteamID64 and access token:

decoded = unquote(steamLoginSecure)

steam_id, access_token = decoded.split("||", 1)

The access token is then used to authenticate the Steam Web API request.

3. Steam Deck Rewards Request

The CLI submits a request to:

https://api.steampowered.com/ILoyaltyRewardsService/RegisterForSteamDeckRewards/v1/

with:

access_token
serial_number
controller_code

The request:

requests.post(
    "https://api.steampowered.com/ILoyaltyRewardsService/RegisterForSteamDeckRewards/v1/",
    params={
        "access_token": access_token,
        "serial_number": serial_id,
        "controller_code": controller_code
    }
)

Project Structure

Steam-Deck-Rewards-CLI/
│
├── RegisterRewards.py
├── Demo.py
└── README.md

RegisterRewards.py

Contains the SteamDeckRegister class for Steam authentication and sending the Steam Deck rewards request.

Demo.py

Provides the CLI and passes the account and device information to SteamDeckRegister.

Important Notes

  • Only use this tool with Steam accounts and Steam Deck devices that you own or are authorized to use.
  • A Steam Deck must be eligible for the relevant rewards.
  • Steam may reject a registration if the device or rewards have already been registered.
  • Steam API behavior may change without notice.
  • Excessive requests may result in temporary rate limiting.
  • This project is not affiliated with, endorsed by, or supported by Valve Corporation.

Disclaimer

This is an unofficial Steam utility and is not affiliated with Valve Corporation. Use it at your own risk.

Releases

Packages

Contributors

Languages