Overview
The FSS Measurement API uses a combination of API keys and Bearer tokens for authentication. All API requests must include proper authentication headers.Required Headers
Every API request must include the following headers:| Header | Value | Description |
|---|---|---|
platform | WEB, IOS, or ANDROID | Platform identifier |
api-key | FSS2023 | Static API key for basic authentication |
Content-Type | application/json | Content type for request body |
Accept | application/json | Expected response format |
Authorization | Bearer {token} | User authentication token (for protected routes) |
Authentication Flow
Public Endpoints
Some endpoints like signup, signin, and forgot password don’t require a Bearer token:
Token Management
Token Expiration
Token Expiration
API tokens do not expire automatically but can be invalidated when:
- User changes password
- User logs out
- Account is deactivated
- Security breach is detected
Token Storage
Token Storage
Best Practices:
- Store tokens securely in environment variables
- Never commit tokens to version control
- Use secure storage mechanisms (keychain, secure storage)
- Implement token refresh logic in your application
Multiple Devices
Multiple Devices
Users can be authenticated on multiple devices simultaneously. Each device can have its own device token for push notifications.
Middleware & Permissions
The API uses Laravel middleware for authentication and authorization:Public Routes
No authentication required:/user/signup/user/signin/user/qrcode_signin/user/forgot_password/user/reset_password/{token}/user/update_password/user/settings/countries/index/how-works/get
Protected Routes
RequiresAuthorization: Bearer {token}:
- All client management endpoints
- All room management endpoints
- All measurement endpoints
- User profile endpoints
- Subscription endpoints
Subscription Required
Requires active subscription:- Most endpoints require an active subscription plan
- Check subscription status via
/transactions/get_user_current_plan
Error Responses
401 Unauthorized
403 Forbidden
429 Too Many Requests
Security Best Practices
HTTPS Only
Always use HTTPS for API requests to ensure data encryption in transit
Secure Storage
Store API tokens in secure, encrypted storage mechanisms
Token Rotation
Implement token refresh logic and handle expired tokens gracefully
Rate Limiting
Respect rate limits (60 requests/minute) to avoid throttling
