Skip to main content

How it works

HookMyApp runs a sandbox Facebook Page. You bind your personal Facebook account to it by sending a code over Messenger; from then on, messages you send to the sandbox Page reach your webhook, and your app replies through the sandbox as the Page. The sandbox covers Messenger messages only. Posts, comments and insights need a connected Page.

Start a session

In the dashboard, open Sandbox and pick the Facebook tab. It shows your bind code and an m.me link to the sandbox Page. Open the link from the Facebook account you want to test with and send the code as a message. The session activates when it arrives. Or ask your agent, with the HookMyApp MCP server connected:
start_sandbox_session with channelType: "facebook" returns the same code and link. From a terminal:
The CLI prints the code and the m.me link. Message the code to the sandbox Page from the account you want to test with. A session stays active until you stop it or start a new one. A Facebook account already connected to another workspace is turned away with a Messenger reply saying so.

Receive messages

Point the session at your receiver:
set_sandbox_destination takes the session and your URL. Messages arrive in the same object: page shape as a connected Page, signed the same way. See Receive webhooks. To forward to a local server instead, keep this running while you test:
Facebook sessions have no phone number, so --session selects them. hookmyapp sandbox env --write .env writes FACEBOOK_API_URL, FACEBOOK_ACCESS_TOKEN and FACEBOOK_PAGE_ID alongside the webhook secret and verify token.

Reply

send_sandbox_message sends as the sandbox Page to the account bound to the session. The sandbox only sends to that account; it takes no recipient. Outside the 24-hour window the send is refused with SESSION_WINDOW_CLOSED: message the sandbox Page again first.

Read the log

get_sandbox_logs returns inbound messages and the forwarding outcome for each. list_sandbox_sessions shows every session in the workspace with the bound sender’s name. hookmyapp sandbox logs --session <ssn_id> prints the same log.
Sandbox sessions are not channels. They have their own ssn_ id and never appear in list_channels or hookmyapp channels list.

Next steps