Overview

Flabs Patient APIs allow you to authenticate patients via OTP and retrieve their medical reports securely.

Patient Authentication Flow

Our patient authentication system uses a two-step verification process:

  1. Request OTP: Send an OTP to the patient’s contact number
  2. Verify OTP: Validate the OTP to receive a patient token
  3. Access Reports: Use the patient token to access patient-specific reports

All API requests require both the lab authentication token (in the Authorization header) and for the reports endpoint, the patient token (in the patient-authorization header).

Getting Started

To integrate with our patient authentication system:

  1. Authenticate your lab client using the Auth API
  2. Request an OTP for the patient using the getLoginOTP endpoint
  3. Have the patient verify the OTP using the verifyLoginOTP endpoint
  4. Retrieve the patient’s reports using the getReports endpoint

Security

Patient data is secure and can only be accessed with:

  • A valid lab authentication token
  • A valid patient-specific token obtained through OTP verification

This dual authentication ensures that only authorized labs can access patient data, and only for patients who have verified their identity.