A Spring Boot application that integrates with the Steam Web API to retrieve game ownership information.
- Fetch owned games from Steam
- Get playtime statistics
- View game achievements
- Easy configuration with environment variables
- Java Development Kit (JDK) 11 or higher
- Maven or Gradle
- Steam API Key (free from https://steamcommunity.com/dev)
- Go to https://steamcommunity.com/dev
- Log in with your Steam account
- Agree to the terms and get your API key
- Store your key securely
There are two ways to configure your Steam API key:
Option A: Using environment variables (Recommended)
set STEAM_API_KEY=your_api_key_hereOption B: Using application.properties
Edit src/main/resources/application.properties and add:
steam.api.key=your_api_key_heremvn clean packagejava -jar target/project-alpha-0.0.1-SNAPSHOT.jarOr use Maven:
mvn spring-boot:runEndpoint: GET /api/steam/owned-games
Query Parameters:
steamId- Your Steam 64-bit ID
Example Request:
curl "http://localhost:8080/api/steam/owned-games?steamId=76561198000000000"Endpoint: GET /api/steam/test
Returns a simple test message to verify the server is running.
Example Request:
curl "http://localhost:8080/api/steam/test"To get your Steam ID:
- Go to https://steamid.io/
- Enter your Steam username or profile URL
- Copy the "Steam64" ID
- Use this ID in your API requests
The API returns a JSON response with your owned games information, including:
- Game names
- Playtime in hours
- Last played dates
- Achievement progress
src/
├── main/
│ ├── java/
│ │ └── com/example/project_alpha/
│ │ ├── controller/
│ │ │ └── SteamController.java
│ │ ├── model/
│ │ │ ├── GameDetails.java
│ │ │ └── SteamApiResponse.java
│ │ ├── service/
│ │ │ └── SteamService.java
│ │ └── config/
│ │ └── RestTemplateConfig.java
│ └── resources/
│ └── application.properties
└── test/
└── java/
└── com/example/project_alpha/
└── controller/
└── SteamControllerTest.java
- Make sure your API key is valid and not expired
- Check that your Steam ID is correct
- Ensure you have internet connectivity
- Verify your Steam ID is correct
- Some games may not have AppInfo available
- Check your API key is properly configured
- Verify your network connection
- Look at the logs for more details
Pair correctly with the browser server Make it return custom info