0xDocs 0x.limo

Docs / REST API

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.

MethodPathAuthSummary
POST/v1/oauth/tokenNoneOAuth 2.0 token endpoint:
POST/v1/oauth/guestNoneA guest account, so a launcher takes part in the network before its player signs in:
POST/v1/oauth/revokeNoneRFC 7009:
GET/v1/oauth/authorizeNoneSign-in page
POST/v1/oauth/authorizeNoneSign-in form post:
POST/v1/oauth/device_authorizationNoneRFC 8628:
GET/v1/oauth/deviceNoneDevice approval page
POST/v1/oauth/deviceNoneApprove or deny a user code
POST/v1/oauth/device/approveBearer tokenA 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.

StatusResponse
200Tokens TokenResponse
400OAuth error (invalid_grant, authorization_pending, slow_down, expired_token, access_denied)
TokenResponse
ts
{
  access_token: string;
  token_type: "Bearer";
  expires_in: number;
  refresh_token: string;
}
bash
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.

StatusResponse
200OK
403Guest accounts are off
429Too many from this address
bash
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.

StatusResponse
200Always
bash
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.

StatusResponse
200HTML
bash
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.

StatusResponse
200HTML (retry)
302Redirect
bash
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.

StatusResponse
200OK
bash
curl -s -X POST "https://api.0x.limo/v1/oauth/device_authorization"

#GET /v1/oauth/device

Device approval page

Auth: None: no token needed.

StatusResponse
200HTML
bash
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.

StatusResponse
200HTML
bash
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).

StatusResponse
200OK Ok
404Unknown or expired
bash
curl -s -X POST "https://api.0x.limo/v1/oauth/device/approve" \
  -H "Authorization: Bearer $ZEROX_TOKEN"