skip to Main Content

Telegram BOT API has functions to send audio files and documents ,But can it play from an online sound streaming URL?

4

Answers


  1. Yes.
    I use:

    define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/');
    $sendto =API_URL."sendmessage?chat_id=".$chatID."&text=".urlencode($url_track);
    file_get_contents($sendto);
    

    For example in row 74 in https://github.com/Ellusu/Jamendo_SearchBot/blob/master/index.php

    Login or Signup to reply.
  2. No, you can’t with Telegram Bot APIs.
    You must download the file and upload it on Telegram servers.

    Login or Signup to reply.
  3. It will just show preview of link and if it’s an audio, an audio bar will be shown. so the answer is yes, but it will not start automatically and user should download and play it.

    Login or Signup to reply.
  4. The userbot VoiceChatStreamer claims to allow exactly that.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search