-
Notifications
You must be signed in to change notification settings - Fork 1
Credential Model
steam-go separates Steam credentials instead of treating them as one generic token.
This makes the SDK safer and easier to reason about.
A Steam Web API key is used for endpoints that require a key parameter.
client, err := steam.NewClient(
steam.WithAPIKey("your-key"),
)client, err := steam.NewClient(
steam.WithAPIKeys("key-a", "key-b", "key-c"),
)Use this to spread traffic across keys that your application legitimately owns.
client, err := steam.NewClient(
steam.WithHealthCheckedAPIKeys(
steam.DefaultAPIKeyHealthConfig(),
"key-a",
"key-b",
),
)When a key repeatedly gets 401 or 429, it can be temporarily cooled down.
An access token is separate from a Web API key.
client, err := steam.NewClient(
steam.WithAccessToken("access-token"),
)Use it only for endpoints or workflows that require token-based access.
OpenID is used for browser-based Steam sign-in.
It verifies a user's Steam identity and returns a SteamID64.
OpenID does not replace:
- Steam Web API keys
- access tokens
- application sessions
- profile-fetching APIs
Do not expose API keys or access tokens to frontend JavaScript.
Recommended pattern:
Browser -> Your Backend -> steam-go -> Steam
Avoid:
Browser -> Steam with raw API key
Steam credentials are often passed through query parameters.
Before logging URLs:
safeURL := steam.RedactSensitiveURL(rawURL)Use the weakest credential that can complete the job:
| Need | Credential |
|---|---|
| Public Web API data requiring key | API Key |
| User-authorized protected action | Access Token |
| Browser sign-in identity | OpenID |
| Server-side publisher operations | Publisher Web API Key |
____ ____ ____ _ _ ____ ____ _ _ / ____ ___ ____ ____ _ _ ____ ____
| __ | | |___ | | |__/ |__/ \_/ / [__ | |___ |__| |\/| __ | __ | |
|__] |__| | |__| | \ | \ | / ___] | |___ | | | | |__] |__|
- SteamID Model
- Steam Web API Notes
- Public Store Page Access Notes
- Partner API Notes
- OpenID Notes
- A2S Notes
- Steam Keys and Access Tokens
- Steam Static Assets
- Steam VDF and addons/vdf
- Steam Web API 特性说明
- 公开商店页面访问说明
- Partner API 说明
- OpenID 说明
- A2S 说明
- Steam Key 与 Access Token
- Steam 静态资源
- Steam VDF 与 addons/vdf