Send Media Message
Facebook
Facebook
Send Media Message
Send a Messenger media message (image, video, audio, or file) from a Page to a user, either from a public URL or an uploaded file. Subject to the 24-hour messaging window.
Action
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
page_id | dropdown | Required | The Facebook Page to send the message from. |
recipient_id | text | Required | The recipient's Page-scoped ID (PSID). |
media_type | select | Required | The kind of media to send. (options: Image, Video, Audio, File) |
url | text | Optional | Publicly accessible URL of the media to send. Provide this OR a file. |
files | files | Optional | Uploaded media files to send. Provide this OR a url. Each file should match the selected media type; one message is sent per file. |
messaging_type | select | Optional | Messaging type: RESPONSE (default), UPDATE, or MESSAGE_TAG. (options: Response, Update, Message Tag) |
sender_action | text | Optional | Optional sender action, e.g. mark_seen, typing_on, typing_off. |
Outputs
| Name | Type | Description |
|---|---|---|
statusCode | number | HTTP status code from the Graph API response. For multi-file sends, the last success status or the first failure status. |
body | object | Graph API response. For file sends, mirrors the last successful response or the first failure; use results for per-file outcomes. |
recipient_id | text | The recipient PSID. |
message_id | text | The id of the sent message. |
attachment_id | text | The reusable attachment id, when returned. |
results | array of object | One ordered outcome per uploaded file when sending via files. Includes earlier successes even if a later send fails. |
filename | text | Filename of the sent media. |
statusCode | number | HTTP status code from the Graph API for this file. |
body | object | Graph API response for this file, when available. Nested fields include: recipient_id, message_id, attachment_id. |
error | text | Error message when this file send failed. |