Complete guide to Loyalty.lt API authentication methods and security
Method | Use Case | Security Level | Rate Limit |
---|---|---|---|
🔥 QR Code Auth | Primary: Desktop/Mobile | High | 1,000/hour |
Phone + OTP | Mobile app login | High | 500/hour |
API Credentials | Server integrations | High | 2,000/hour |
JWT Tokens | User sessions | Medium | 1,000/hour |
Partner Authentication | Partner management | High | 5,000/hour |
Generate QR Session
Display QR Code
Mobile Scan
User Confirmation
Real-time Authentication
Request OTP
User Enters OTP
Verify & Login
Access Partner Dashboard
Navigate to API Settings
Generate New Credentials
X-API-Key
: Your public API keyX-API-Secret
: Your private API secretContent-Type
: Always application/json
Request OTP
Verify OTP & Login
Use JWT Token
Generate QR Session
Display QR Code
Mobile Scan & Confirm
Feature | API Credentials | JWT Tokens |
---|---|---|
Use Case | Server backends | User sessions |
Storage | Server environment | Client app |
Expires | Never (unless revoked) | 1 hour (renewable) |
Rate Limit | 2,000/hour | 1,000/hour |
User Context | No | Yes (specific user) |
Security | Very High | Medium |
Error Code | Status | Cause | Solution |
---|---|---|---|
AUTH_REQUIRED | 401 | Missing auth headers | Add X-API-Key and X-API-Secret |
INVALID_CREDENTIALS | 401 | Wrong API credentials | Verify key/secret in dashboard |
TOKEN_EXPIRED | 401 | JWT token expired | Use refresh token endpoint |
INSUFFICIENT_PERMISSIONS | 403 | Limited access rights | Check partner permissions |
RATE_LIMIT_EXCEEDED | 429 | Too many requests | Implement exponential backoff |