Facebook — Messenger
Get Page conversations — facebook.get_page_conversations
Lists Messenger conversations of a Page, most recently updated first. Pass user_id (PSID) to find the thread with one person. Supports paging.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | pages_messaging |
Input
| Field | Type | Required | Description |
|---|---|---|---|
page_id | string | yes | Page id. From facebook.list_managed_pages. |
user_id | string | no | Only the thread with this person's PSID. From a facebook.message_received event. |
fields | string | no | Comma-separated Graph fields to return, e.g. "id,message,from,created_time". |
limit | integer | no | Max items per page (1-100). Min 1. Max 100. |
after | string | no | Cursor for the next page, from paging.cursors.after of the previous call. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | array of object | |
data[].id | string | |
data[].updated_time | string | |
data[].snippet | string | |
data[].message_count | integer | |
paging | object | |
paging.cursors | object |
Get conversation messages — facebook.get_conversation_messages
Lists messages in a Messenger conversation. Request fields such as message,from,created_time to get content; supports paging.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | pages_messaging |
Input
| Field | Type | Required | Description |
|---|---|---|---|
page_id | string | yes | Page id. From facebook.list_managed_pages. |
conversation_id | string | yes | Conversation id, e.g. "t_123". From facebook.get_page_conversations. |
fields | string | no | Comma-separated Graph fields to return, e.g. "id,message,from,created_time". |
limit | integer | no | Max items per page (1-100). Min 1. Max 100. |
after | string | no | Cursor for the next page, from paging.cursors.after of the previous call. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | array of object | |
data[].id | string | |
data[].message | string | |
data[].created_time | string | |
data[].from | object | |
paging | object | |
paging.cursors | object |
Get message details — facebook.get_message_details
Reads one Messenger message by id: text, sender, recipients, time and attachments. Pass fields to choose what to return.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | pages_messaging |
Input
| Field | Type | Required | Description |
|---|---|---|---|
page_id | string | yes | Page id. From facebook.list_managed_pages. |
message_id | string | yes | Message id. From facebook.get_conversation_messages. |
fields | string | no | Comma-separated Graph fields to return, e.g. "id,message,from,created_time". |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
id | string | |
message | string | |
created_time | string | |
from | object | |
attachments | object |
Send Messenger text message — facebook.send_message
Sends a text message from a Page to a person (PSID). Outside the 24-hour window use messaging_type MESSAGE_TAG with a tag. Waits for human approval.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | no | pages_messaging |
Input
| Field | Type | Required | Description |
|---|---|---|---|
page_id | string | yes | Page id. From facebook.list_managed_pages. |
recipient_id | string | yes | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
text | string | yes | Message text to send. |
messaging_type | string | no | RESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG. |
tag | string | no | Message tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
recipient_id | string | |
message_id | string |
Approval card: shown as message (page → page_id, recipient → recipient_id, text → text).
Send Messenger media message — facebook.send_media_message
Sends an image, video, audio or file (https URL) from a Page to a person (PSID). Outside the 24-hour window use MESSAGE_TAG. Waits for human approval.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | no | pages_messaging |
Input
| Field | Type | Required | Description |
|---|---|---|---|
page_id | string | yes | Page id. From facebook.list_managed_pages. |
recipient_id | string | yes | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
media_type | string | yes | Kind of file at url: image, video, audio or file (any other document). One of: image, video, audio, file. |
url | string | yes | Public https URL of the file to send. |
messaging_type | string | no | RESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG. |
tag | string | no | Message tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
recipient_id | string | |
message_id | string |
Approval card: shown as message (page → page_id, recipient → recipient_id, media → url).
Mark message seen — facebook.mark_message_seen
Shows the seen receipt to a person in Messenger for the latest message they sent to the Page.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | low | no | yes | pages_messaging |
Input
| Field | Type | Required | Description |
|---|---|---|---|
page_id | string | yes | Page id. From facebook.list_managed_pages. |
recipient_id | string | yes | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
recipient_id | string |
Toggle typing indicator — facebook.toggle_typing_indicator
Turns the typing indicator on or off for a person in Messenger, so a slower reply feels live.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | low | no | yes | pages_messaging |
Input
| Field | Type | Required | Description |
|---|---|---|---|
page_id | string | yes | Page id. From facebook.list_managed_pages. |
recipient_id | string | yes | Person's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event. |
on | boolean | yes | true shows the typing indicator, false hides it. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
recipient_id | string |