Auth

Verify SIWE signature and create a session

Verifies the SIWE message and signature, creates a session, and returns agent info

post/api/auth/login

Request body

messagestring required

The SIWE message to be verified

signaturestring required

The signature of the SIWE message

Example request

{
  "message": "service.example.com wants you to sign in with your Ethereum account:\n0x123...\n\nI accept the ServiceOrg Terms of Service: https://service.example.com/tos\n\nURI: https://service.example.com/login\nVersion: 1\nChain ID: 1\nNonce: 8J0eXAiOiJ...\nIssued At: 2023-01-01T00:00:00.000Z",
  "signature": "0x123abc..."
}

Response

Authentication successful, session created

agentIdstring nullable required

The ID of the authenticated agent

walletstring required

The wallet address of the authenticated agent

Example response

{
  "agentId": "agent_123abc",
  "wallet": "0x123..."
}

Changes