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

# Get / reset API token

> POST /api/user-api/auth: exchange your account credentials for a Bearer token

POST your account email and password to receive a fresh API token.

<Warning>
  Calling this endpoint **invalidates your previous token**. Update any services using the old token immediately.
</Warning>

## Parameters

**No authorization required for this endpoint.** Use your email and password instead.

## Body parameters

<ParamField body="email" type="string" required>
  Your EclipseProxy account email.
</ParamField>

<ParamField body="password" type="string" required>
  Your EclipseProxy account password.
</ParamField>

## Response

<ResponseField name="status" type="string" required>
  `"success"` when the token was generated.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable confirmation.
</ResponseField>

<ResponseField name="data" type="object" required>
  <Expandable title="data properties">
    <ResponseField name="apiToken" type="string" required>
      The new API token. Store securely and include as `Authorization: Bearer <token>` on every other endpoint.
    </ResponseField>
  </Expandable>
</ResponseField>

## Rate limit

**1 request per 5 minutes** per account and per IP. Store the token and reuse it: don't call this on every request.

## Example response

```json theme={"dark"}
{
  "status": "success",
  "message": "API token generated and previous token (if any) invalidated",
  "data": {
    "apiToken": "NEW_API_TOKEN"
  }
}
```

## When to rotate

* Token was exposed (committed to a repo, leaked in logs, shared)
* Routine security rotation
* A teammate left and may have had access

Calling this endpoint generates a new token and invalidates the old one. Update every script that uses the old token.

## Errors

* **401**: wrong email or password
* **429**: rate-limited (you hit the 1-per-5-min cap)
* **5xx**: internal error; retry with exponential backoff
