0xDocs 0x.limo

Docs / Getting started

Accounts and tokens

Create a 0x account, sign the 0x CLI in, and get a publish token for CI.

There is no separate developer account type. Any 0x account can publish hosted sites, run game servers and submit store listings. Each listing, site and server belongs to the account that created it.

#Sign up

Create an account in either of these places:

FieldRule
Username3–32 characters: a-z, 0-9, _, - and ., starting with a letter or digit. Stored in lowercase and unique.
PasswordAt least 10 characters.
Display nameOptional, at most 32 characters. If you leave it out, your username is used. Players see it as the developer name.

Sign-up is rate-limited per address: at most 5 new accounts per address per day. Above that the request fails with 429 slow_down.

The underlying call is POST /v1/oauth/signup {username, password, persona_name?}. It returns the same token pair as a sign-in.

#Sign the CLI in: 0x login

bash
0x login

0x login uses the OAuth 2.0 device flow (RFC 8628):

  1. The CLI prints a link to https://api.0x.limo/v1/oauth/device?user_code=... and a code. The code expires after 10 minutes.
  2. You open the link, sign in and approve the code.
  3. The CLI receives an access token and uses it to mint a publish token named 0x cli on <hostname>.
  4. The publish token is saved in ~/.config/0x/0x-cli.json (mode 600), with the API URL and your account id.

After that, 0x publish, 0x deploy-server, 0x server, 0x submit and 0x issues all use the saved token. 0x whoami shows the account, your usage and your limits. 0x logout deletes the file.

#Publish tokens

A publish token starts with 0xpub_. It is valid only on the developer surfaces: /v1/hosting/* (publishing), /v1/listings/* (store submissions and review issues), /v1/scriptbus/packages* (0x script packages), and the game-server host. It cannot mint further tokens, because minting needs an access token from a real sign-in. That means a leaked publish token cannot be used to create more. Tokens minted before the rename to 0x start with x1pub_ and keep working.

#Developer › Tokens

api.0x.limo/dev/tokens manages your publish tokens in the browser. Sign in with your username and password, then:

  • Create a token with a name (where you'll use it: laptop, GitHub Actions). It is shown once, with a Copy button; 0x keeps only its hash.
  • See every token: name, created, last used, and what it can do (hosted sites, store listings, script packages). Revoked ones stay listed as revoked.
  • Revoke one. Tools using it stop on their next request.

You can have at most 25 live tokens. Minting is rate-limited per account (a burst of 10, then one every 6 minutes), for 0x login as well. 0x support can also revoke a token, for example one leaked in a public CI log; you'll see it as revoked here.

CallWhat it does
POST /v1/hosting/tokens {name}Mints a token. Needs an access token. The token is shown once. 409 at 25 live tokens, 429 when minting too fast.
GET /v1/hosting/tokensLists your tokens: id, name, created, last used, revoked, scopes
DELETE /v1/hosting/tokens/<id>Revokes a token

#Tokens in CI

Set the token in the environment instead of running 0x login:

bash
export ZEROX_PUBLISH_TOKEN=0xpub_...   # 0x publish, 0x deploy-server, 0x server
export ZEROX_TOKEN=$ZEROX_PUBLISH_TOKEN   # 0x submit, 0x issues (they read ZEROX_TOKEN)
0x publish

To get a token for CI, use any of these:

  • create one at Developer › Tokens (/dev/tokens) and copy it;
  • run 0x login once on your own machine and copy token from ~/.config/0x/0x-cli.json;
  • mint a dedicated token with an access token:
bash
curl -s https://api.0x.limo/v1/hosting/tokens \
  -H "authorization: Bearer $ACCESS_TOKEN" -H 'content-type: application/json' \
  -d '{"name":"ci"}'

Note

The upload page at /hosting/ signs you in with your password and keeps the access token for the browser tab only (sessionStorage). It does not show or mint publish tokens: Developer › Tokens does.

#Access tokens

Games and the launcher sign players in with OAuth 2.0: an authorization code with PKCE in the browser, the device flow, or the password grant in first-party forms. The result is a short-lived EdDSA access JWT and a rotating refresh token. Access tokens work on every /v1 route that needs a signed-in player. For your game's own sign-in, see the REST API and the JS SDK.

#Check who you are

bash
0x whoami
json
{
  "steamid": "…",
  "persona_name": "you",
  "via": "publish_token",
  "usage": { "bytes": 1468006, "sites": 1 },
  "limits": { "quota_bytes": 2147483648, "max_file_bytes": 67108864, "max_files": 5000, "max_sites": 20 }
}