mediaItems is an array used by endpoints like:
- Create Post (
POST /v2/access/posts) - Send Message (
POST /v2/access/chats/{userId}/messages) - Create Mass Message (
POST /v2/access/mass-messages)
mediaItems array.
Accepted Item Formats
Each element inmediaItems can be one of the following:
You can mix formats in the same array. Order is preserved.
Upload References Are Single-Use
If you pass amediaUploadId (the value returned by POST /v2/access/uploads/init) inside mediaItems, OFAuth resolves it and then consumes the upload reference.
If you need to attach the same media multiple times, store and reuse the vault media ID instead.
Examples
Use a vault media ID
Use an upload reference
Mix formats
Validation Rules (Quick)
- Non-numeric strings that are not an
upload:reference and not anhttp(s)://URL are rejected. - Only
http://andhttps://URLs are accepted. - If an upload reference is invalid/expired/unused (not ready), the request fails with
400.