OAuth and sign-in
Generated reference for the 9 /v1/oauth operations of the 0x REST API.
Generated from steamworks sg-backend/openapi.yaml at build 3a4a58e45c+dirty. Do not edit by hand.
Guide: Authentication. Errors are {"error": "..."} with the status (errors); limits are in rate limits.
| Method | Path | Auth | Summary |
|---|---|---|---|
POST | /v1/oauth/token | None | OAuth 2.0 token endpoint: |
POST | /v1/oauth/guest | None | A guest account, so a launcher takes part in the network before its player signs in: |
POST | /v1/oauth/revoke | None | RFC 7009: |
GET | /v1/oauth/authorize | None | Sign-in page |
POST | /v1/oauth/authorize | None | Sign-in form post: |
POST | /v1/oauth/device_authorization | None | RFC 8628: |
GET | /v1/oauth/device | None | Device approval page |
POST | /v1/oauth/device | None | Approve or deny a user code |
POST | /v1/oauth/device/approve | Bearer token | A signed-in app approves a device code: |
#POST /v1/oauth/token
OAuth 2.0 token endpoint: password, refresh_token (rotating, reuse revokes the family), authorization_code (PKCE S256), device_code
Auth: None: no token needed.
Request body (application/x-www-form-urlencoded):
A JSON object; the fields are in the summary above.
| Status | Response |
|---|---|
| 200 | Tokens TokenResponse |
| 400 | OAuth error (invalid_grant, authorization_pending, slow_down, expired_token, access_denied) |
TokenResponse
{
access_token: string;
token_type: "Bearer";
expires_in: number;
refresh_token: string;
}curl -s -X POST "https://api.0x.limo/v1/oauth/token" \
-d key=value#POST /v1/oauth/guest
A guest account, so a launcher takes part in the network before its player signs in: {access_token, refresh_token, expires_in, steamid, persona_name, guest: true}. No user name or password; owns the free apps. Rate-limited per address as a sign-in; 403 when SG_GUESTS=0
Auth: None: no token needed.
| Status | Response |
|---|---|
| 200 | OK |
| 403 | Guest accounts are off |
| 429 | Too many from this address |
curl -s -X POST "https://api.0x.limo/v1/oauth/guest"#POST /v1/oauth/revoke
RFC 7009: revokes the token's family
Auth: None: no token needed.
| Status | Response |
|---|---|
| 200 | Always |
curl -s -X POST "https://api.0x.limo/v1/oauth/revoke"#GET /v1/oauth/authorize
Sign-in page (authorization code + PKCE; loopback redirect URIs on any port)
Auth: None: no token needed.
| Status | Response |
|---|---|
| 200 | HTML |
curl -s "https://api.0x.limo/v1/oauth/authorize"#POST /v1/oauth/authorize
Sign-in form post: redirects to redirect_uri with code and state
Auth: None: no token needed.
| Status | Response |
|---|---|
| 200 | HTML (retry) |
| 302 | Redirect |
curl -s -X POST "https://api.0x.limo/v1/oauth/authorize"#POST /v1/oauth/device_authorization
RFC 8628: device_code, user_code, verification_uri, interval
Auth: None: no token needed.
| Status | Response |
|---|---|
| 200 | OK |
curl -s -X POST "https://api.0x.limo/v1/oauth/device_authorization"#GET /v1/oauth/device
Device approval page
Auth: None: no token needed.
| Status | Response |
|---|---|
| 200 | HTML |
curl -s "https://api.0x.limo/v1/oauth/device"#POST /v1/oauth/device
Approve or deny a user code (with credentials)
Auth: None: no token needed.
| Status | Response |
|---|---|
| 200 | HTML |
curl -s -X POST "https://api.0x.limo/v1/oauth/device"#POST /v1/oauth/device/approve
A signed-in app approves a device code: {user_code, allow}
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Status | Response |
|---|---|
| 200 | OK Ok |
| 404 | Unknown or expired |
curl -s -X POST "https://api.0x.limo/v1/oauth/device/approve" \
-H "Authorization: Bearer $ZEROX_TOKEN"