telegram bot don't send mp3 file from xammp se

2019-09-13 10:00发布

问题:

  1. My mp3 link is : 1.mp3
  2. OS = Windows Server 2008 and run xammp server
  3. My code is :
    https://api.telegram.org/bot_token/sendAudio?chat_id=@test&audio=http://panel.cafefars.com:8088/mp3/1.mp3

Error after run :

{"ok":false,"error_code":400,"description":"Bad Request: failed to get HTTP URL content"}

mp3 url is correct but telegram not download

thanks all

回答1:

Firstly you should encode your URL - by this one for example.
Secondly you should check your URL because it doesn't work for me too, but this is works fine - http://beginenglish.ru/download/audio/5/f/7/4/8843aa965d.mp3.

You can test it by this request (don't forget to change bot_token and chat_id):

https://api.telegram.org/bot_token/sendAudio?chat_id=@chat_id&audio=http%3A%2F%2Fbeginenglish.ru%2Fdownload%2Faudio%2F5%2Ff%2F7%2F4%2F8843aa965d.mp3