Video Attachment

You can send videos by uploading them or sharing a URL using the Send API.

Examples

URL send

curl -X POST -H "Content-Type: application/json" -d '{
  "recipient":{
    "id":"USER_ID"
  },
  "message":{
    "attachment":{
      "type":"video",
      "payload":{
        "url":"https://petersapparel.com/bin/clip.mp4"
      }
    }
  }
}' "https://graph.facebook.com/v2.6/me/messages?access_token=PAGE_ACCESS_TOKEN"    

File upload

curl  \
  -F 'recipient={"id":"USER_ID"}' \
  -F 'message={"attachment":{"type":"video", "payload":{}}}' \
  -F 'filedata=@/tmp/clip.mp4;type=video/mp4' \
  "https://graph.facebook.com/v2.6/me/messages?access_token=PAGE_ACCESS_TOKEN"    

Fields

attachment object

Property Name Description Required

type

video

Y

payload.url

URL of video binary

Y