Skip to main content

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:

Authentication Flow

1

Public Endpoints

Some endpoints like signup, signin, and forgot password don’t require a Bearer token:
2

Get Authentication Token

Sign in to receive your Bearer token:
Response:
3

Use Bearer Token

Include the token in protected endpoint requests:

Token Management

API tokens do not expire automatically but can be invalidated when:
  • User changes password
  • User logs out
  • Account is deactivated
  • Security breach is detected
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
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

Requires Authorization: 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

Code Examples