---
title: "Login"
method: GET
path: "/api/BestBi/login"
tags: ["BestBi"]
---

# Login

`GET /api/BestBi/login`

**Function**: `login`
**Type**: API Endpoint (GET)

**Purpose**:  
This function verifies the user's credentials and returns a JSON response indicating whether the login was successful or not.

**URL**:  
`GET http://<baseURL>/api/BestBI/login`

**Request Headers**:
- **Username** (Header, required):  
  The email address of the user to log in.
- **Password** (Header, required):  
  The password of the user to log in.

**Response**:  
A JSON response containing the status of the login attempt.
If the login is successful, the response will contain a "status" key with the value "success" and either an "mfa" or "message" key depending on whether MFA is enabled or not.
If the login fails, the response will contain a "status" key with the value "failed" and a "message" key with the error message.

**Error Handling**:
- Raises HTTP 401 if the email or password is incorrect.
- Raises HTTP 500 for any other exceptions encountered during execution.

## Headers

- `Username` string, required
- `Password` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi.md) · [All operations](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/leapsurgebi/leapsurgeapi/revisions/5a6b1464bfeb/schema)
