Skip to main content

What you need

  • A HookMyApp account
  • A connected Facebook Page, or a Facebook sandbox for testing
  • A channel token and Page id for that channel
  • An agent runtime that can read incoming Messenger messages and send outgoing replies
If your Page is already connected, skip to Configure your agent.

Connect Facebook Page

For testing, start a Facebook sandbox session:
The CLI opens a Messenger thread with the HookMyApp test Page. Send the prefilled message from your Facebook account. See Sandbox for the full flow. To use your own Page, connect it through Meta:
The Instagram account linked to the Page connects in the same step. See Connect a Page for the full connect flow.

Configure agent

Pull credentials into a .env file your agent runtime can load. For a sandbox session:
For a connected channel:
Your agent reads these values:
  • FACEBOOK_GRAPH_API_URL: full send URL for this channel
  • FACEBOOK_ACCESS_TOKEN: channel token for sending messages
  • FACEBOOK_PAGE_ID: connected Page ID used in the send URL
  • WEBHOOK_HMAC_SECRET: webhook signing secret for your receiver
The receiver shape is identical between the sandbox and your own Page.

Agent capabilities

Your agent can receive Messenger messages, send replies, answer Page comments, and use the CLI to inspect the connected Page.

Send messages

Use the send URL and token from the env values. See Send messages for the message shape.

Listen to conversations

For local development, listen for messages on your laptop:
For your own Page, set the public URL where HookMyApp sends messages and comment events:

Use with agent framework

If your personal agent runs on a framework like OpenClaw or Hermes, you do not have to write any transport code.
These runtimes can run shell commands, so give them the HookMyApp CLI and your agent can send and receive messages from your connected Page.
Give your agent a prompt like this to wire it up:
Agent prompt
For deeper, framework-specific wiring, point your agent at the agent skills and the CLI reference.
For other runtimes (Python, Go, Rust), use the same env values and adapt the transport on your side.

Next steps

  • Build with AI: Use Cursor, Codex, or Claude Code to wire all this for you.
  • CLI: Command reference for everything above.
  • Send messages: Send a Messenger message.
  • Receive webhooks: Inbound webhook handling and signature verification.