Skip to main content
The CoinFello API uses Sign-In with Ethereum (EIP-4361) for authentication. You must complete the SIWE flow to obtain a session cookie before calling the A2A endpoint. Unauthenticated requests return a 401 error.

Flow overview

1

Request a nonce

Fetch a one-time nonce from the server tied to your wallet address.
2

Construct and sign the SIWE message

Build an EIP-4361 message using the nonce, then sign it with your wallet.
3

Verify the signature

Submit the signed message to the server. On success, you receive a session cookie valid for subsequent requests.

Step 1: Request a nonce

Response
The -c cookies.txt flag saves the session cookie jar for use in subsequent requests.

Step 2: Construct and sign the SIWE message

Build an EIP-4361 message using the nonce. The message format is:
Sign this message with your wallet to produce a signature. Most wallet libraries (viem, ethers.js, wagmi) expose a signMessage method for this.
The exact string you sign must match what you submit in step 3. Use a SIWE library (e.g., viem/siwe) to construct and parse the message consistently.

Step 3: Verify the signature

Submit the signed message and signature to authenticate. Include -b cookies.txt to send the cookie from step 1 and -c cookies.txt to save the updated session cookie.
On success the server sets an authenticated session cookie. Pass this cookie with all subsequent A2A requests.

Making authenticated requests

Use the saved cookie jar with every API call: