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

# Providers

> Choose, configure, and combine Spectrum platform providers.

Providers plug into Spectrum's type system and runtime. Each provider exports a callable. Call `provider.config(...)` to register it, and call `provider(app)` or `provider(space)` to [narrow](/spectrum-ts/platform-narrowing) into its platform-specific instance.

## Built-in providers

<CardGroup cols={2}>
  <Card title="iMessage" icon="comment" href="/spectrum-ts/providers/imessage">
    Connect through local, cloud, or dedicated modes. Use tapbacks, typing indicators, threaded replies, DMs, and groups.
  </Card>

  <Card title="Terminal" icon="terminal" href="/spectrum-ts/providers/terminal">
    Run a local chat interface for development, testing, and CLI-style agents.
  </Card>

  <Card title="WhatsApp Business" icon="whatsapp" href="/spectrum-ts/providers/whatsapp-business">
    Use the official WhatsApp Business Cloud API for 1:1 customer conversations.
  </Card>

  <Card title="Telegram" icon="paper-plane" href="/spectrum-ts/providers/telegram">
    Use the Telegram Bot API with Fusor webhooks, media, reactions, replies, typing, and edits.
  </Card>

  <Card title="Slack" icon="hash" href="/spectrum-ts/providers/slack">
    Connect one or more Slack workspaces with text, media, reactions, threads, typing, and edits.
  </Card>
</CardGroup>

## Combining providers

Drop any combination into `providers`:

<Tabs>
  <Tab title="Aggregate import">
    ```ts theme={null}
    import { Spectrum } from "spectrum-ts";
    import { imessage, slack, terminal, whatsappBusiness } from "spectrum-ts/providers";

    const app = await Spectrum({
      projectId: "...",
      projectSecret: "...",
      providers: [
        imessage.config(),
        whatsappBusiness.config({
          accessToken: process.env.WA_TOKEN!,
          phoneNumberId: process.env.WA_NUMBER_ID!,
          appSecret: process.env.WA_SECRET!,
        }),
        slack.config({
          tokens: { TEAM_ID: process.env.SLACK_BOT_TOKEN! },
        }),
        terminal.config(),
      ],
    });
    ```
  </Tab>

  <Tab title="Individual imports">
    ```ts theme={null}
    import { Spectrum } from "spectrum-ts";
    import { imessage } from "spectrum-ts/providers/imessage";
    import { slack } from "spectrum-ts/providers/slack";
    import { terminal } from "spectrum-ts/providers/terminal";
    import { whatsappBusiness } from "spectrum-ts/providers/whatsapp-business";

    const app = await Spectrum({
      projectId: "...",
      projectSecret: "...",
      providers: [
        imessage.config(),
        whatsappBusiness.config({
          accessToken: process.env.WA_TOKEN!,
          phoneNumberId: process.env.WA_NUMBER_ID!,
          appSecret: process.env.WA_SECRET!,
        }),
        slack.config({
          tokens: { TEAM_ID: process.env.SLACK_BOT_TOKEN! },
        }),
        terminal.config(),
      ],
    });
    ```
  </Tab>
</Tabs>

`app.messages` merges messages from every provider. The `message.platform` field tells you which provider delivered each message.

## Writing your own

If none of the built-ins fit, implement a provider with `definePlatform`. See [Building a custom platform](/spectrum-ts/custom-platforms).
