InsightStream has two, deliberately separate, authentication mechanisms.
Every endpoint except /api/auth/login and /api/ingest/email requires:
1
Authorization: Bearer <token>
POST /api/auth/login1
2
3
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"ChangeMe123!"}'
1
2
3
4
5
6
7
{
"success": true,
"data": {
"token": "eyJhbGciOi...",
"user": { "id": "...", "username": "admin", "lastLogin": "2026-07-25T18:00:00Z" }
}
}
Jwt:Key, expires after Jwt:ExpiryMinutes (default 60)401 {"success":false,"message":"Invalid username or password."}1
X-Ingest-Token: <shared secret>
Compared against Ingest:Token using CryptographicOperations.FixedTimeEquals — not a JWT, not
tied to a user, just a shared secret between the cPanel PHP relay and this API. See
Ingest API.