Can't upload audio to telegram Bad Request: failed to get HTTP URL content
Asked Answered
W

2

6

I have working url to mp3, and I am trying to send audio to Telegram by this url. It works from time to time, but most of time it gives error

"A request to the Telegram API was unsuccessful. The server returned HTTP 400 
Bad Request. Response body:
[b'{"ok":false,"error_code":400,"description":"Bad Request: failed to get HTTP 
URL content"}']"

And I can't understand why, because I've checked the size and type, everything is clear, I can't find no more limitations in documentation of Telegram API. Who knows what is the reason of error?

link to mp3 - http://data3.api.xn--41a.ws/vkp/cs9-5v4.userapi.com/p15/51bdb5ec5899ed.mp3

Win answered 3/8, 2017 at 18:42 Comment(2)
Take a look at this answerQuesada
I have already checked it, it doesn't work for meWin
A
0

Check the file extension and the correct MIME type, please.

For one example, according to the telegram doc:

In sendDocument, sending by URL will currently only work for GIF, PDF and ZIP files.

Allergen answered 3/2, 2024 at 20:57 Comment(0)
A
-3

Check file size.

Provide Telegram with an HTTP URL for the file to be sent. Telegram will download and send the file. 5 MB max size for photos and 20 MB max for other types of content.

Post the file using multipart/form-data in the usual way that files are uploaded via the browser. 10 MB max size for photos, 50 MB for other files.

Advert answered 15/2, 2018 at 17:46 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.