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

# Authentication

> Obtaining and using your Inbox API token

## Get your API token

1. Log in to your Inbox dashboard at [inboxapp.com](https://inboxapp.com)
2. Navigate to **Settings → API**
3. Click **New API token**
4. Enter a name for your token and click **Create**
5. Copy the token immediately — you won't see it again

<Warning>
  Store your API token securely. Never commit it to version control or share it
  publicly.
</Warning>

## Using the token

Include your token in the `Authorization` header of every request:

```
Authorization: Bearer YOUR_API_TOKEN
```

### Environment variable setup

```bash theme={null}
# Add to your shell profile or .env file
export INBOX_API_TOKEN="your_token_here"
```

### Making requests

<CodeGroup>
  ```typescript axios theme={null}
  import axios from "axios";

  const client = axios.create({
    baseURL: "https://inboxapp.com/api/v1",
    headers: {
      Authorization: `Bearer ${process.env.INBOX_API_TOKEN}`,
      "Content-Type": "application/json",
    },
  });

  const { data: team } = await client.get("/team");
  console.log("Connected to:", team.name);
  ```

  ```javascript fetch theme={null}
  const response = await fetch("https://inboxapp.com/api/v1/team", {
    headers: {
      Authorization: `Bearer ${process.env.INBOX_API_TOKEN}`,
      "Content-Type": "application/json",
    },
  });

  const team = await response.json();
  console.log("Connected to:", team.name);
  ```

  ```bash cURL theme={null}
  curl https://inboxapp.com/api/v1/team \
    -H "Authorization: Bearer $INBOX_API_TOKEN" \
    -H "Content-Type: application/json"
  ```
</CodeGroup>

**Expected response:**

```json theme={null}
{
  "id": "hzcai5t59nn9vsck3rbuepyg",
  "name": "Acme Corp",
  "slug": "acme-corp",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": null,
  "currency": "USD",
  "allowSupportAccess": false
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Quick start" icon="rocket" href="/quickstart">
    Send your first message
  </Card>

  <Card title="Core concepts" icon="book" href="/guides/core-concepts">
    Understand the data model
  </Card>

  <Card title="Error codes" icon="shield-x" href="/reference/error-codes">
    All error types and recovery
  </Card>

  <Card title="Rate limits" icon="gauge" href="/reference/rate-limits">
    API limits and backoff
  </Card>
</CardGroup>
