Skip to content

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 effectRiskNeeds approvalIdempotentScopes
NONElownoyespages_messaging

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
user_idstringnoOnly the thread with this person's PSID. From a facebook.message_received event.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,message,from,created_time".
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].updated_timestring
data[].snippetstring
data[].message_countinteger
pagingobject
paging.cursorsobject

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 effectRiskNeeds approvalIdempotentScopes
NONElownoyespages_messaging

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
conversation_idstringyesConversation id, e.g. "t_123". From facebook.get_page_conversations.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,message,from,created_time".
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].messagestring
data[].created_timestring
data[].fromobject
pagingobject
paging.cursorsobject

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 effectRiskNeeds approvalIdempotentScopes
NONElownoyespages_messaging

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
message_idstringyesMessage id. From facebook.get_conversation_messages.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,message,from,created_time".

Extra fields: ignored.

Output

FieldTypeDescription
idstring
messagestring
created_timestring
fromobject
attachmentsobject

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 effectRiskNeeds approvalIdempotentScopes
WRITEhighyesnopages_messaging

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
recipient_idstringyesPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.
textstringyesMessage text to send.
messaging_typestringnoRESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG.
tagstringnoMessage tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE.

Extra fields: ignored.

Output

FieldTypeDescription
recipient_idstring
message_idstring

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 effectRiskNeeds approvalIdempotentScopes
WRITEhighyesnopages_messaging

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
recipient_idstringyesPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.
media_typestringyesKind of file at url: image, video, audio or file (any other document). One of: image, video, audio, file.
urlstringyesPublic https URL of the file to send.
messaging_typestringnoRESPONSE (default) replies within 24h of their last message; MESSAGE_TAG sends later with a tag. One of: RESPONSE, UPDATE, MESSAGE_TAG.
tagstringnoMessage tag, required when messaging_type is MESSAGE_TAG, e.g. HUMAN_AGENT or ACCOUNT_UPDATE.

Extra fields: ignored.

Output

FieldTypeDescription
recipient_idstring
message_idstring

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 effectRiskNeeds approvalIdempotentScopes
WRITElownoyespages_messaging

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
recipient_idstringyesPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.

Extra fields: ignored.

Output

FieldTypeDescription
recipient_idstring

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 effectRiskNeeds approvalIdempotentScopes
WRITElownoyespages_messaging

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
recipient_idstringyesPerson's Page-scoped id (PSID). From facebook.get_page_conversations or a facebook.message_received event.
onbooleanyestrue shows the typing indicator, false hides it.

Extra fields: ignored.

Output

FieldTypeDescription
recipient_idstring