> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gosentrix.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Log In

> Authenticate and obtain access tokens

Authenticate with email and password to obtain access and refresh tokens.

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.gosentrix.io/api/v1/auth/login \
    -H "Content-Type: application/json" \
    -d '{
      "email": "user@example.com",
      "password": "SecurePassword123!"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expires_in": 900,
    "user": {
      "id": "user-123",
      "email": "user@example.com",
      "email_verified": true
    }
  }
  ```
</ResponseExample>

## Request Body

<ParamField path="email" type="string" required>
  User email address
</ParamField>

<ParamField path="password" type="string" required>
  User password
</ParamField>

## Response

<ResponseField name="access_token" type="string">
  JWT access token (valid for 15 minutes)
</ResponseField>

<ResponseField name="refresh_token" type="string">
  JWT refresh token (valid for 7 days)
</ResponseField>

<ResponseField name="expires_in" type="integer">
  Access token expiration time in seconds
</ResponseField>

<ResponseField name="user" type="object">
  User object with id, email, and verification status
</ResponseField>

## Errors

<ResponseField name="401" type="object">
  Invalid credentials
</ResponseField>

<ResponseField name="403" type="object">
  Account locked or email not verified
</ResponseField>

<ResponseField name="429" type="object">
  Rate limit exceeded (too many login attempts)
</ResponseField>

## Security Notes

* Failed login attempts are rate-limited
* MFA may be required if enabled
* See [MFA Verify](/authentication-api/mfa-verify) if MFA is enabled
