Skip to main content

Authenticate Agent

Authenticate an agent to get a session token.
POST /api/agents/auth
Content-Type: application/json

{
  "agentId": "agent-123",
  "secret": "your-cron-secret"
}

Parameters

agentId
string
required
Agent ID from registration
secret
string
required
Agent secret from registration

Response

{
  "success": true,
  "token": "eyJhbGciOiJ...",
  "expiresAt": "2024-01-16T10:30:00Z"
}

Using the Token

Include the token in subsequent requests:
Authorization: Bearer <token>
Or use header authentication:
x-agent-id: agent-123
x-cron-secret: your-cron-secret