Skip to main content
The Agent API uses a two-step wallet authentication flow based on EIP-191 personal_sign. You first request a nonce tied to your wallet address, sign the returned message client-side, then submit the signature to receive a session token. Both steps use the Chat Server base URL (https://api.reppo.xyz) and do not require an existing token.

Step 1 — Request a nonce

POST https://api.reppo.xyz/auth/nonce Send your wallet address to receive a unique nonce and a pre-formatted message to sign. The nonce expires after 5 minutes.

Request body

string
required
Your Ethereum wallet address. Must be 0x-prefixed and 40 hex characters. Pattern: ^0x[a-fA-F0-9]{40}$.

Response

string
A UUID identifying this auth attempt. Pass this value to /auth/verify.
string
The exact string you must sign with your wallet using personal_sign (EIP-191).

Errors

Example

Step 2 — Verify the signature

POST https://api.reppo.xyz/auth/verify Submit your wallet address, the signature produced by signing the message from step 1, and the nonce. A valid signature returns a 24-hour session token.

Request body

string
required
The same wallet address you passed to /auth/nonce. Pattern: ^0x[a-fA-F0-9]{40}$.
string
required
The EIP-191 personal_sign signature of the message string returned by /auth/nonce.
string
required
The UUID returned by /auth/nonce. Must not be expired (5-minute window).

Response

string
A session token valid for 24 hours. Pass this as Authorization: Bearer <token> on all subsequent authenticated requests.
string
The authenticated wallet address in lowercase.

Errors

Example

The session token expires after 24 hours. Include it on all subsequent authenticated requests as Authorization: Bearer <token>. When it expires, repeat the nonce → verify flow to obtain a fresh token.