Docs / API: Account
Start wallet sign-in
Returns a message for a Solana wallet to sign. The message expires in 5 minutes and works once. Signing sends no transaction and costs nothing.
POST/api/v1/auth/challenge
| Property | Value |
|---|---|
| Authentication | Not needed. |
| Rate-limit cost | 1 unit |
| Status | Live |
#Request body
JSON
{
"address": "BASE58_WALLET_ADDRESS"
}#Request
curl -s -X POST "https://farbeamlabs.com/api/v1/auth/challenge" \
-H "content-type: application/json" \
-d '{"address": "BASE58_WALLET_ADDRESS"}'const res = await fetch("https://farbeamlabs.com/api/v1/auth/challenge", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"address": "BASE58_WALLET_ADDRESS"})
});
const { data, meta, error } = await res.json();
if (error) throw new Error(`${error.code}: ${error.message}`);
console.log(data);import os, requests
res = requests.post(
"https://farbeamlabs.com/api/v1/auth/challenge",
json={'address': 'BASE58_WALLET_ADDRESS'},
timeout=30,
)
body = res.json()
if "error" in body:
raise RuntimeError(body["error"]["code"])
print(body["data"])#Fields
| Field | Type | Description |
|---|---|---|
data.nonce | string | Send this value back to /auth/verify. |
data.message | string | The exact text the wallet must sign, as UTF-8. |
data.expires_at | string | UTC time. |
#Notes
- EVM wallet sign-in is planned. Today only Solana wallets can sign in.
#Errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_address | The address format does not match the chain. |
| 429 | rate_limited | A limit was reached. See Retry-After. |
All errors share one format. See errors.