Skip to main content
Public pool and token metadata do not require credentials. Most data, routing, and transaction-schema endpoints do. Choose the credential that matches your client: Both flows begin with an invited wallet.

Create a browser wallet session

1

Request a challenge

Send the wallet address to POST /auth/challenge.
The response contains data.nonce and data.message.
2

Sign the returned message

Ask the wallet to sign the exact UTF-8 bytes in data.message. Do not reconstruct, trim, or normalize the message.Signing proves control of the address. It does not submit a transaction or spend a token record.
3

Verify the signature

Send the address and signature to POST /auth/verify. The example stores the returned cookies in session.cookies.
A successful response sets access and refresh tokens as httpOnly cookies. The JSON body returns the wallet address, access-token expiry, and a CSRF token.
4

Send authenticated requests

Include the cookie jar on subsequent requests. Add the CSRF token in X-CSRF-Token for state-changing session requests.
Access cookies expire after 15 minutes. POST /auth/refresh rotates the refresh token and sets fresh cookies. If two refreshes race, one can return 409; retry the original API request after the successful refresh completes.

Create an API token for a backend

API-token creation requires an authenticated browser session and invited access.
The response shows the full ss_... token once. Store it before closing the response. Later list responses expose only token metadata and a prefix. Use the token as a bearer credential:

Credential boundaries

  • A valid wallet signature establishes wallet control, not administrator authority.
  • API tokens cover data and trading endpoints. Token management and administrative endpoints require a wallet session.
  • WebSocket clients can request a short-lived ticket with a browser session or API token. They must renew authentication before the 60-second ticket expires.
  • Never place session cookies, CSRF tokens, or API tokens in URLs or logs.
  • Revoke a backend token with DELETE /api-tokens/{id} when it is no longer needed.
  • Use GET /auth/sessions and POST /auth/sessions/{session_id}/revoke to manage wallet sessions.
  • Use POST /auth/logout for the current session or POST /auth/logout-all for every wallet session.