Skip to main content

Send text

recipient.id is the sender.id (PSID) from the inbound webhook.
PAGE_ID is the Page id from hookmyapp channels show <channel> and PAGE_ACCESS_TOKEN the channel token from hookmyapp channels token <channel>.

Send an attachment

type is image, video, audio or file. The URL must be public https.

The 24-hour window

Messenger allows a free-form reply only within 24 hours of the person’s last message.
Outside that window the send is rejected with HTTP 409 and the message “This person last messaged you more than 24 hours ago”, unless a message tag applies.
Send outside the window with a tag:
Tags Meta accepts today: CONFIRMED_EVENT_UPDATE, POST_PURCHASE_UPDATE, ACCOUNT_UPDATE, and HUMAN_AGENT for Pages Meta has approved for it.
Each tag is limited to the kind of update its name describes. Promotional content under a tag gets the Page restricted.
The channel page shows the open windows: each recent sender and whether their 24 hours are still running.

Mark as seen and typing

sender_action is mark_seen, typing_on or typing_off. Sender actions are free.

Reply to a comment in private

Send the commenter a Messenger message instead of a public reply. See Comments.

Send with the CLI

Send with MCP

send_message accepts a Facebook channel. Pass the PSID as the recipient.

Next steps

  • Receive webhooks: Get the PSID from the inbound message.
  • Inbox: Read the conversation before you reply.