【问题标题】:telegram bot don't send mp3 file from xammp server in windows server电报机器人无法从 Windows 服务器中的 xampp 服务器发送 mp3 文件
【发布时间】:2017-06-19 18:51:33
【问题描述】:
  1. 我的 mp3 链接是: 1.mp3
  2. 操作系统 = Windows Server 2008 并运行 xammp 服务器
  3. 我的代码是:
    https://api.telegram.org/bot_token/sendAudio?chat_id=@test&audio=http://panel.cafefars.com:8088/mp3/1.mp3

运行后出错:

{"ok":false,"error_code":400,"description":"错误请求:获取失败 HTTP URL 内容"}

mp3 url 正确但电报无法下载

谢谢大家

【问题讨论】:

    标签: audio telegram telegram-bot


    【解决方案1】:

    首先你应该对你的 URL 进行编码 - 例如this one
    其次你应该检查你的 URL,因为它对我也不起作用,但这很好用 - http://beginenglish.ru/download/audio/5/f/7/4/8843aa965d.mp3

    你可以通过这个请求来测试它(不要忘记更改bot_token和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
    

    【讨论】:

    • 我的链接没问题,对我有用,但电报无法访问链接!
    【解决方案2】:

    文件名错误!

    网址中的文件名至少为 4 位数字或混合字母/数字

    【讨论】:

      猜你喜欢
      • 2021-08-16
      • 1970-01-01
      • 2015-05-24
      • 2013-12-18
      • 1970-01-01
      • 1970-01-01
      • 2013-11-21
      • 2017-06-16
      • 1970-01-01
      相关资源
      最近更新 更多