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

# Authentication

> Authenticate your API requests using Bearer tokens.

The DialogBot API uses API keys to authenticate requests. Include your API key as a Bearer token in the `Authorization` header of every request.

## Obtaining an API key

<Steps>
  <Step title="Log in to DialogBot ">
    Go to [https://portal.intellixent.ai/](https://portal.intellixent.ai/) and sign in to your account.
  </Step>

  <Step title="Navigate to API Keys">
    Open the **API Keys** page from your account settings.
  </Step>

  <Step title="Create a new key">
    Click **Create new API Key**, then copy and securely store the generated key.
  </Step>
</Steps>

<Warning>
  Keep your API key confidential. Do not share it publicly or commit it to version control. If a key is compromised, delete it and create a new one.
</Warning>

## Using your API key

Pass your key in the `Authorization` header of every request:

```text theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://portal.intellixent.ai/api/user/campaigns" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://portal.intellixent.ai/api/user/campaigns', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const data = await response.json();
  ```
</CodeGroup>

## Error responses

If your API key is missing or invalid, the API returns a `401 Unauthorized` response:

```json theme={null}
{
  "message": "Unauthenticated."
}
```
