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

# Test your setup

> Run a smoke test against the live Luma API to confirm your API key, network access, and @alhwyn/luma TypeScript SDK install work end-to-end.

Use these steps to confirm your API key, SDK install, and network access before building an integration.

<Note>
  All examples below call the **real Luma API**. Use a test calendar and non-production data when possible.
</Note>

## Prerequisites

* [Luma Plus](https://luma.com) organization
* API key from [Luma API keys](https://luma.com/calendar/manage/api-keys)
* `@alhwyn/luma` installed with `npm install @alhwyn/luma` or `bun add @alhwyn/luma` ([Install](/install))

## Smoke test

Create `smoke.ts`:

```typescript theme={null}
import { Luma } from "@alhwyn/luma";

const luma = new Luma(process.env.LUMA_API_KEY!);

const user = await luma.users.get();
console.log("Authenticated as:", user.email);

const { data: events } = await luma.events.list({ pagination_limit: 3 });
console.log(
  "Recent events:",
  events.map((e) => e.name ?? e.api_id),
);
```

This exercises `luma.users.get()` and `luma.events.list()` — see [Users](/users/get) and [Events](/events/list).

If the script fails with `AuthenticationError`, double-check the key and that your organization has API access.

## Read guests on a real event

Once the smoke test passes, try read-only calls on an event you own. Use an event ID from the smoke test output or your Luma dashboard:

```typescript theme={null}
import { Luma } from "@alhwyn/luma";

const luma = new Luma(process.env.LUMA_API_KEY!);

const eventId = "evt-abc123";

const event = await luma.events.get(eventId);
console.log(event.name);

const { data: guests } = await luma.events.guests.list(eventId, {
  pagination_limit: 5,
});
console.log(`${guests.length} guests loaded`);
```

<Warning>
  `events.guests.add` and `events.create` write data. Test writes on a dedicated test event, not a live production event.
</Warning>

## Troubleshooting

| Error                       | Likely cause                                                    |
| --------------------------- | --------------------------------------------------------------- |
| `AuthenticationError` (401) | Invalid or missing `LUMA_API_KEY`                               |
| `ValidationError` (400)     | Wrong parameter shape — check the method docs for that resource |
| `RateLimitError` (429)      | Too many requests — back off and retry                          |
| Missing `LUMA_API_KEY`      | Export the variable or add it to `.env` in your project root    |

## Next steps

* [Client](/client) — initialize the Luma client
* [Events](/events/list) — list, create, and manage guests
* [Webhooks](/webhooks/create) — receive real-time updates
