Authentication
Secure your API requests with JWT tokens.
Getting a Token
Two methods to obtain JWT tokens:
Method 1: Via Dashboard (Recommended)
- Log in to https://test.kovanetwork.com
- Token automatically stored in browser localStorage
- Check browser devtools:
localStorage.getItem('kova_auth_token')
Method 2: Test Token Endpoint (Development Only)
curl -X POST \
-H "Content-Type: application/json" \
-d '{"userId": "your-user-id"}' \
https://test.kovanetwork.com/api/v1/auth/test-token
Response:
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"userId": "9d4a6656-02c8-4e16-a4c3-910efe92e7e2",
"expiresIn": "1h"
}
Security Warning
The test-token endpoint is for development only. In production, use proper wallet authentication or OAuth.
Using Tokens
Include token in Authorization header with "Bearer" scheme:
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
https://test.kovanetwork.com/api/v1/deployments
Token Expiration
Tokens expire after 1 hour. If you get 401 Unauthorized with "token expired", get a new token.
Automatic token refresh not yet implemented. You'll need to re-authenticate after 1 hour. Keep track of expiration or implement refresh logic in your app.