401 error.
Flow overview
Construct and sign the SIWE message
Build an EIP-4361 message using the nonce, then sign it with your wallet.
Step 1: Request a nonce
-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: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.