I am using python to send photos and images to telegram and when i send 1 image or video everything works fine. i have tried to send 2 and more videos/images. but telegram returns bad request: can't parse media JSON object
. Parsed data:
{
'chat_id': 123456781,
'caption': 'test',
'media': [
{
'type': 'video',
'media': 'attach://video0'
},
{
'type': 'video',
'media': 'attach://video0'
}
]
}
what is wrong with json?
2
Answers
Found what was the problem, problem was with attached files. added file url instead
'media': 'attach://video0'
like'media': 'fileurl'
I had the same error on
editMessageMedia
method. It turned out that this method accepts media not as object, but as serialised string.