Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hack4impact-umd/breastfeeding-center-gw/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The BCGW API uses Firebase Auth ID tokens (JWTs) for authentication. Every request to a protected endpoint must include a valid token in theAuthorization header. The only public endpoints are POST /auth/register/root and POST /auth/register/invite/:inviteId.
Getting a Token
Sign in with the Firebase Auth SDK on the client, then callgetIdToken() to retrieve the current token:
true to getIdToken() to force a refresh before the token expires.
Passing the Token
Include the token as aBearer value in the Authorization header on every authenticated request:
Example cURL request
Role-Based Access Control
Some endpoints require elevated roles. Roles are stored as custom claims on the Firebase Auth JWT and are enforced server-side by thehasRoles middleware.
| Role | Level | Description |
|---|---|---|
VOLUNTEER | 0 | Read-only access to most data |
ADMIN | 1 | Can manage data and delete lower-level users |
DIRECTOR | 2 | Full access; can manage all users and roles |
Error Responses
| Status | Meaning |
|---|---|
403 | Token is missing, malformed, expired, or the user’s role is insufficient for the requested operation |
The BCGW API always returns
403 for authentication and authorization failures — it never returns 401. This applies both when the token is absent or invalid and when the user’s role is too low for the requested endpoint. Treat any 403 on an authenticated endpoint as a signal to re-authenticate.