Admin Login
Authenticates an administrator with email and password credentials. This endpoint verifies that the user has admin privileges before granting access.Authentication
No authentication required.Request Body
Administrator’s email address
Administrator’s password
Response
Success message
Authenticated admin user information
Supabase authentication session
Error Responses
Error message
401- Unauthorized (invalid credentials)403- Forbidden (user does not have admin privileges)404- User not found in database500- Internal server error
Example Request
Example Success Response
Example Error Response (Non-Admin User)
Usage Notes
- This endpoint should be used exclusively for admin authentication flows
- Authentication credentials are verified first, then admin role is checked
- If a regular user tries to login through this endpoint, they will receive a 403 error even with valid credentials
- Store the
access_tokensecurely and include it in theAuthorizationheader for subsequent admin API requests - The token allows access to admin-protected endpoints throughout the API