Farbeam
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
PropertyValue
AuthenticationNot needed.
Rate-limit cost1 unit
StatusLive

#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

FieldTypeDescription
data.noncestringSend this value back to /auth/verify.
data.messagestringThe exact text the wallet must sign, as UTF-8.
data.expires_atstringUTC time.

#Notes

  • EVM wallet sign-in is planned. Today only Solana wallets can sign in.

#Errors

HTTPCodeMeaning
400invalid_addressThe address format does not match the chain.
429rate_limitedA limit was reached. See Retry-After.

All errors share one format. See errors.