Skip to content

[Telegram] sendMediaGroup - 400 Bad Request for documents array or mix #650

@VladimirCores

Description

@VladimirCores

When I try to send multiple documents I got the error:

0|npm start  | AxiosError: Telegram API - 400 Bad Request: wrong file identifier/HTTP URL specified
0|npm start  |     at TelegramClient.<anonymous> (/.../node_modules/messaging-api-telegram/dist/TelegramClient.js:67:27)
0|npm start  |     at Generator.throw (<anonymous>)
0|npm start  |     at rejected (/.../node_modules/messaging-api-telegram/dist/TelegramClient.js:6:65)
0|npm start  |     at runMicrotasks (<anonymous>)
0|npm start  |     at processTicksAndRejections (internal/process/task_queues.js:95:5)
0|npm start  | Error Message -
0|npm start  |   Telegram API - 400 Bad Request: wrong file identifier/HTTP URL specified
0|npm start  | Request -
0|npm start  |   POST /sendMediaGroup
0|npm start  | Request Data -
0|npm start  |   {
0|npm start  |     "chat_id": "@groupid",
0|npm start  |     "media": [
0|npm start  |       {
0|npm start  |         "type": "document",
0|npm start  |         "media": "https://64.media.tumblr.com/e5382624feb56e3b32740a22b3305ee8/ca057c4fa92f6baa-d7/s500x750/7797a8155b711abc2732c432ec5a8c37b1860b84.gif"
0|npm start  |       },
0|npm start  |       {
0|npm start  |         "type": "document",
0|npm start  |         "media": "https://64.media.tumblr.com/0f40868b31818022a7c70929ce45fb44/ca057c4fa92f6baa-5b/s500x750/2837ebfa5540ac6351a122bba26a89f648328cb2.gif"
0|npm start  |       },
0|npm start  |       {
0|npm start  |         "type": "document",
0|npm start  |         "media": "https://64.media.tumblr.com/a9e19e401667c4407fdab006d6f56354/ca057c4fa92f6baa-42/s500x750/716719270053218835f34ad4e4deb89cdc935d6b.gif"
0|npm start  |       },
0|npm start  |       {
0|npm start  |         "type": "document",
0|npm start  |         "media": "https://64.media.tumblr.com/19c75eb828ed442b9aae91289956209a/ca057c4fa92f6baa-85/s500x750/b0e8779ed8a2a598d54f02356bf0889901ff914d.gif"
0|npm start  |       }
0|npm start  |     ]
0|npm start  |   }
0|npm start  | Response -
0|npm start  |   400 Bad Request
0|npm start  | Response Data -
0|npm start  |   {
0|npm start  |     "ok": false,
0|npm start  |     "error_code": 400,
0|npm start  |     "description": "Bad Request: wrong file identifier/HTTP URL specified"
0|npm start  |   }

However in the original documentation its written that sending InputMediaDocument should be possible:
Screen Capture_select-area_20210830024908

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions