P
P
PHPStudent2022-04-19 20:28:44
PHP
PHPStudent, 2022-04-19 20:28:44

How to get list of files from media_group in Telegram API?

Hello! Now I noticed that if two or more images are sent to the bot with one message , then each image will still be sent as a separate message , but they will have a group identifier media_group_id . But I didn’t find anything at all in the documentation, is it possible somehow to get a list of all uploaded images in this group using this identifier?

{
 "update_id": 93272994,
 "message": {
  "message_id": 157567,
  "from": {
   "id": 5662283,
   "is_bot": false,
   "first_name": "⚜️",
   "language_code": "ru"
  },
  "chat": {
   "id": 5175562283,
   "first_name": "⚜️",
   "type": "private"
  },
  "date": 1650389126,
  "media_group_id": "132033343012242812",
  "photo": [
   {
    "file_id": "AgACAgQAAxkBAAEPX89iXvCGD6asCl784FgguLgkI3inLAACibkxG8K98VKSLu7XMOZC9gEAAwIAA3MAAyQE",
    "file_unique_id": "AQADFSDSDxG8K98VJy",
    "file_size": 621,
    "width": 90,
    "height": 45
   },
   {
    "file_id": "AgACAgQAAxkBAAEPFSDvCGafy7KxPPOVWElEIMfo6MrwACibkxG8K98VKSLu7XMOZC9gEAAwIAA3kAAyQE",
    "file_unique_id": "AQADFSDSDxG8K98VJy",
    "file_size": 10067,
    "width": 320,
    "height": 159
   },
   {
    "file_id": "AgACAgQAAxkBAAEPFSDvCGafy7KxPPOVWElEIMfo6MrwACibkxG8K98VKSLu7XMOZC9gEAAwIAA3kAAyQE",
    "file_unique_id": "AQADibkxG8K98VJ9",
    "file_size": 40322,
    "width": 800,
    "height": 398
   },
   {
    "file_id": "AgACAgQAAxkBAAEPFSDvCGafy7KxPPOVWElEIMfo6MrwACibkxG8K98VKSLu7XMOZC9gEAAwIAA3kAAyQE",
    "file_unique_id": "AQADFSDSDxG8K98VJy-",
    "file_size": 68861,
    "width": 1280,
    "height": 637
   }
  ]
 }
}


{
 "update_id": 93272995,
 "message": {
  "message_id": 157568,
  "from": {
   "id": 5662283,
   "is_bot": false,
   "first_name": "⚜️",
   "language_code": "ru"
  },
  "chat": {
   "id": 5175562283,
   "first_name": "⚜️",
   "type": "private"
  },
  "date": 1650389126,
  "media_group_id": "132033343012242812",
  "photo": [
   {
    "file_id": "AgACAgQAAxkBAAEPFSDvCGafy7KxPPOVWElEIMfo6MrwACibkxG8K98VKSLu7XMOZC9gEAAwIAA3kAAyQE",
    "file_unique_id": "AQADFSDSDxG8K98VJy",
    "file_size": 621,
    "width": 90,
    "height": 45
   },
   {
    "file_id": "AgACAgQAAxkBAAEPX9BiXvCGafy7KxPPOVWElEIMfo6MrwACibkxG8K98VKSLu7XMOZC9gEAAwIAA20AAyQE",
    "file_unique_id": "AQADFSDSDxG8K98VJy",
    "file_size": 10067,
    "width": 320,
    "height": 159
   },
   {
    "file_id": "AgACAgQAAxkBAAEPFSDvCGafy7KxPPOVWElEIMfo6MrwACibkxG8K98VKSLu7XMOZC9gEAAwIAA3kAAyQE",
    "file_unique_id": "AQADFSDSDxG8K98VJy",
    "file_size": 40322,
    "width": 800,
    "height": 398
   },
   {
    "file_id": "AgACAgQAAxkBAAEPFSDvCGafy7KxPPOVWElEIMfo6MrwACibkxG8K98VKSLu7XMOZC9gEAAwIAA3kAAyQE",
    "file_unique_id": "AQADFSDSDxG8K98VJy-",
    "file_size": 68861,
    "width": 1280,
    "height": 637
   }
  ]
 }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question