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

# Quickstart

> Connect a Facebook Page and start sending and receiving Messenger messages.

## What you will have

Your Page's Messenger messages arrive at your laptop.<br />
You reply from the terminal, with your Page.

## Install and authenticate

```bash theme={null}
npm install -g @gethookmyapp/cli
hookmyapp login
```

## Connect a Page

```bash theme={null}
hookmyapp channels connect facebook
```

This opens the HookMyApp dashboard.<br />
Click **Connect Channel**, then **Facebook**, sign in, and pick the Page.<br />
The CLI waits and prints the new channel when the Page is connected.

A Page with a linked Instagram account also connects that account as its own channel.

### List channels

```bash theme={null}
hookmyapp channels list
```

This shows the Pages connected to your workspace, with their `ch_xxxxxxxx` ids.

See [Connect a Page](/facebook/connect) for the full flow and what you get back.

## Listen for messages

```bash theme={null}
hookmyapp channels listen ch_xxxxxxxx --path /webhook/facebook
```

This tells HookMyApp to send your Page's Messenger messages, comments and post events to your computer while the command is running.<br />
`--path /webhook/facebook` is the route in your local app that receives them.<br />
Stop the CLI with Ctrl-C when you are done.

## Send a message

Message your Page from your personal Facebook account. The webhook carries the `sender.id` (the PSID).<br />
Reply to it:

```bash theme={null}
hookmyapp facebook messages send --channel ch_xxxxxxxx --to <psid> --text "hello from my app"
```

## Set deployed webhook URL

```bash theme={null}
hookmyapp channels webhook set ch_xxxxxxxx \
  --url https://api.yourapp.com/webhook/facebook \
  --verify-token $(openssl rand -hex 32)
```

Run this when your receiver is deployed behind a stable public URL.

## Next steps

* [Send messages](/facebook/send-messages): Text, attachments and the 24-hour window.
* [Receive webhooks](/facebook/receive-webhooks): Verify the signature and acknowledge fast.
* [Publish](/facebook/publish): Post to the Page from your app.
