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
Agent ID from registration
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