Skip to content

Commit a688958

Browse files
Krupa Srinivasfacebook-github-bot
authored andcommitted
Multi-Image API
Summary: Updating the "Messenger Platform API" postman collection with the Multi-Image API More details on postman collection: https://fb.workplace.com/groups/mocafyi/permalink/30198172653161527/ Reviewed By: sbhat222 Differential Revision: D80655928 fbshipit-source-id: dd7ae0b325084a3a832aa9bc473f47a958fa8ce3
1 parent f07e4d4 commit a688958

File tree

1 file changed

+143
-1
lines changed

1 file changed

+143
-1
lines changed

postman/messenger-platform-api.postman_collection.json

Lines changed: 143 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,151 @@
294294
"body": "{\n \"recipient_id\": \"5275811702471834\",\n \"message_id\": \"m_8jw49phNrbbdRTp6PbYL7IAcfn2p3T7uiO5jm0L_PMSzOUezi9uBPNnhL701j3AtJtQmzRtoHwk15jAWQa_MvA\"\n}"
295295
}
296296
]
297+
},
298+
{
299+
"name": "Multi Image Message",
300+
"request": {
301+
"method": "POST",
302+
"header": [],
303+
"body": {
304+
"mode": "raw",
305+
"raw": "\n {\n \"recipient\": {\n \"id\": {{page-scoped-id}}\n },\n \"message\": {\n \"attachments\": [\n {\n \"type\": \"image\",\n \"payload\": {\n \"url\": \"<PATH_TO_ASSET>\"\n }\n },\n {\n \"type\": \"image\",\n \"payload\": {\n \"url\": \"<PATH_TO_ASSET>\"\n }\n }\n ]\n }\n}",
306+
"options": {
307+
"raw": {
308+
"language": "json"
309+
}
310+
}
311+
},
312+
"url": {
313+
"raw": "https://graph.facebook.com/{{version}}/{{page-id}}/messages",
314+
"protocol": "https",
315+
"host": [
316+
"graph",
317+
"facebook",
318+
"com"
319+
],
320+
"path": [
321+
"{{version}}",
322+
"{{page-id}}",
323+
"messages"
324+
]
325+
},
326+
"description": "To send a message with media, such as a GIF or image, or a template, you add the content to the API request in a JSON message attachment object.\n\nTo send a message with an image to a person who sent your Page a message, send a `POST` request to the `/PAGE-ID/messages` endpoint, with the `recipient` object literal key `id` set to person's Page-scoped ID (PSID), the `message_type` parameter set to `RESPONSE`, and the `message` parameter `attachment` object `type` key set to `image` and the `payload` object `url` key set to the URL for the image."
327+
},
328+
"response": [
329+
{
330+
"name": "Multi Image Message",
331+
"originalRequest": {
332+
"method": "POST",
333+
"header": [],
334+
"body": {
335+
"mode": "raw",
336+
"raw": "\n {\n \"recipient\": {\n \"id\": {{page-scoped-id}}\n },\n \"message\": {\n \"attachments\": [\n {\n \"type\": \"image\",\n \"payload\": {\n \"url\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRN2z0ERwXQUqH29urPuzWueLXKhJAY6SMyAA&s\"\n }\n },\n {\n \"type\": \"image\",\n \"payload\": {\n \"url\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRN2z0ERwXQUqH29urPuzWueLXKhJAY6SMyAA&s\"\n }\n }\n ]\n }\n}",
337+
"options": {
338+
"raw": {
339+
"language": "json"
340+
}
341+
}
342+
},
343+
"url": {
344+
"raw": "https://graph.facebook.com/{{version}}/{{page-id}}/messages",
345+
"protocol": "https",
346+
"host": [
347+
"graph",
348+
"facebook",
349+
"com"
350+
],
351+
"path": [
352+
"{{version}}",
353+
"{{page-id}}",
354+
"messages"
355+
]
356+
}
357+
},
358+
"status": "OK",
359+
"code": 200,
360+
"_postman_previewlanguage": "json",
361+
"header": [
362+
{
363+
"key": "Content-Type",
364+
"value": "application/json; charset=UTF-8"
365+
},
366+
{
367+
"key": "Vary",
368+
"value": "Origin"
369+
},
370+
{
371+
"key": "x-business-use-case-usage",
372+
"value": "{\"602662469590800\":[{\"type\":\"messenger\",\"call_count\":1,\"total_cputime\":1,\"total_time\":1,\"estimated_time_to_regain_access\":0}]}"
373+
},
374+
{
375+
"key": "Access-Control-Allow-Origin",
376+
"value": "*"
377+
},
378+
{
379+
"key": "facebook-api-version",
380+
"value": "v22.0"
381+
},
382+
{
383+
"key": "Strict-Transport-Security",
384+
"value": "max-age=15552000; preload"
385+
},
386+
{
387+
"key": "Pragma",
388+
"value": "no-cache"
389+
},
390+
{
391+
"key": "Cache-Control",
392+
"value": "private, no-cache, no-store, must-revalidate"
393+
},
394+
{
395+
"key": "Expires",
396+
"value": "Sat, 01 Jan 2000 00:00:00 GMT"
397+
},
398+
{
399+
"key": "x-fb-request-id",
400+
"value": "Af6ECfWGO49nW6EE023zSgc"
401+
},
402+
{
403+
"key": "x-fb-trace-id",
404+
"value": "HtgriTzVmsP"
405+
},
406+
{
407+
"key": "x-fb-rev",
408+
"value": "1026137354"
409+
},
410+
{
411+
"key": "X-FB-Debug",
412+
"value": "o/RyQ+ErC27QYcvUX23u6CETF6p4cAs0exU52ViYxkrq0m1xUHvmzpFVKT3N1HrTxdvjE3hB91jpxn1trMa9ew=="
413+
},
414+
{
415+
"key": "Date",
416+
"value": "Wed, 20 Aug 2025 21:29:40 GMT"
417+
},
418+
{
419+
"key": "X-FB-Connection-Quality",
420+
"value": "EXCELLENT; q=0.9, rtt=5, rtx=0, c=10, mss=1208, tbw=6002, tp=-1, tpl=-1, uplat=1793, ullat=0"
421+
},
422+
{
423+
"key": "Alt-Svc",
424+
"value": "h3=\":443\"; ma=86400"
425+
},
426+
{
427+
"key": "Connection",
428+
"value": "keep-alive"
429+
},
430+
{
431+
"key": "Content-Length",
432+
"value": "139"
433+
}
434+
],
435+
"cookie": [],
436+
"body": "{\n \"recipient_id\": \"9665725193552786\",\n \"message_id\": \"m_QyYvbrNH7A2jMwmFbFi2j5DE6lKR-pprCwDO5evbcLIY5QOq5zutol0LEsL8TOWqu1fqrQDUvjA94Q5ZVcSYyg\"\n}"
437+
}
438+
]
297439
}
298440
],
299-
"description": "The Send API is the main API used to send messages to users, including text, attachments, templates, sender actions, and more.\n\n### Before You Start\n\nYou will need:\n\n- A Page access token requested by a person who can perform the `MESSAGE` task on the Page\n \n- The `pages_messaging` permission\n \n- The message recipient must have sent your Page a message within the last 24 hours or agreed to receive messages from your Page outside of the standard 24 hour messaging window"
441+
"description": "The Send API is the main API used to send messages to users, including text, attachments, templates, sender actions, and more.\n\n### Before You Start\n\nYou will need:\n\n- A Page access token requested by a person who can perform the `MESSAGE` task on the Page\n \n- The `pages_messaging` permission\n \n- The message recipient must have sent your Page a message within the last 24 hours or agreed to receive messages from your Page outside of the standard 24 hour messaging window\n \n\n## Send a Media Attachment\n\nTo send a message with media, such as a GIF or image, or a template, you add the content to the API request in a JSON message attachment object.\n\n## Send Multiple Media Attachments\n\nTo send a message with multiple images, you add the content to the API request in a JSON message attachments array. The only media type allowed is an image, and it is limited to 30 images at once. \n\nFor more details see: [https://developers.facebook.com/docs/messenger-platform/send-messages](https://developers.facebook.com/docs/messenger-platform/send-messages)"
300442
},
301443
{
302444
"name": "Attachment Upload API",

0 commit comments

Comments
 (0)