telegram

Upload self-signed ssl certificate to telegram

老子叫甜甜 提交于 2019-12-03 04:01:29
I'm making telegram bot using webhook on php. The problem is that the webhook doesn't set correctly and idk whats the matter. my setwebhook code : $ch = curl_init(API_URL); try { $cert = new \CURLFile(SSL_KEY); apiRequest('setWebhook', array('url' => WEBHOOK_URL , 'certificate' => $cert)); echo "webhook set"; } catch (Exception $e) { echo "error"; } You can set the webhook via the terminal rather than in your code like so: curl -F "url=https://your_domain.com/where-the-script-will-be/bot-script.php" -F "certificate=@/location/of/cert/certificate.crt" https://api.telegram.org/bot000000000

How to force telegram to update link preview?

北城以北 提交于 2019-12-03 02:40:52
问题 Telegram show description meta tag as link preview. I changed the description meta tag but the link preview of my website didn't changed. How to force telegram to update link preview? 回答1: Go to @webpagebot and send the link (up to 10) you want to update. Automatically will scan your site and generate the new image thumbnail, site name and description. Remember to have og prefix in your html tag as: <html prefix="og: http://ogp.me/ns#"> or telegram bot will not update the graph cache. via

How do I get authentication in a telegram bot?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 02:20:10
问题 Telegram Bots are ready now. If we use the analogy of web browser and websites, the telegram client applications are like the browser clients. The Telegram Chatrooms are like websites. Suppose we have some information we only want to restrict to certain users, on the websites, we will have authentication. How do we achieve the same effect on the Telegram Bots? I was told that I can use deep linking. See description here I will reproduce it below: Create a bot with a suitable username, e.g.

Telegram Bot How to delete or remove a message or media from a channel or group

只愿长相守 提交于 2019-12-03 01:22:16
I want to know an example of removing message or file like a photo I did not find any functional tutorial in this regard, ihoru There is no such functionality in Telegram Bot API right now. UPD 2017-05-19: There is an official method deleteMessage , more info: https://core.telegram.org/bots/api#deletemessage https://stackoverflow.com/a/43965602/1140438 fox.cpp There is an official support of deleteMessage method in Bot API 3.0. More details here: https://core.telegram.org/bots/api#deletemessage https://api.telegram.org/botTOKEN/deleteMessage?chat_id=CID&message_id=MID As you can see there are

Calling Telegram API to create a feedreader bot [closed]

人走茶凉 提交于 2019-12-03 00:29:20
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . I have seen New API for bots are enabled to create custome bots,I have seen some sources such as this and this I have also read about @fatherbot which is about registering bots,I also searched about some examples about telegram bots such as this one,I know how write codes in php and python but can not find out how to call api methods and where to get start.Does any one has any idea how to

How we should send query to Telegram bot API?

馋奶兔 提交于 2019-12-02 19:25:39
After creating a telegram bot and gain bot token, I want to send a request to the bot API. This link says we must send the HTTP request like this: https://api.telegram.org/bot<token>/METHOD_NAME and brings example for easiest method "getme" which has not any input parameters. Imagine I want to send some messages. I should use the sendMessage method which has two Required input parameters: chat_ID and text. Now my Questions begins: How can I write this sendMessage method in above request format with its parameters? I tried sendMessage(param1,param2) and received method not found message. What

Accessing Telegram API via web-based client [duplicate]

人走茶凉 提交于 2019-12-02 19:24:27
问题 This question already has answers here : How to implement authorization using a Telegram API? (4 answers) Closed 2 years ago . I am studying Telegram API to develop a web-based app to communicate with Telegram API server but stumble upon this statement. The protocol is designed for access to a server API from applications running on mobile devices. It must be emphasized that a web browser is not such an application. Does this anyway tell us that Telegram API is ONLY accessible by Mobile-based

Telegram BOT Api: how to send a photo using PHP?

独自空忆成欢 提交于 2019-12-02 18:37:32
The sendPhoto command require an argument photo defined as InputFile or String . The API doc tells: Photo to send. You can either pass a file_id as String to resend a photo that is already on the Telegram servers, or upload a new photo using multipart/form-data. And InputFile This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser. So I tried this method $bot_url = "https://api.telegram.org/bot<bot_id>/"; $url = $bot_url . "sendPhoto?chat_id=" . $chat_id; $ch = curl_init(); curl_setopt($ch,

How to receive my own telegram messages in node.js without bot

一曲冷凌霜 提交于 2019-12-02 17:41:34
I would like to have a very simple client in nodejs (an example) that can receive messages from my contacts in telegram. I just searched in internet but I only get bot samples. I want to receive group messages in what I don't have access to give privileges to my bot so I would like to know if I can receive my own messages with no bot as intermediary. Well... Other answers give examples from unmaintained libraries. Hence, you should not rely on these libraries. See: telegram.link is dead You should use the newest Telegram client library which is telegram-mtproto 1. Obtain your api_id and api

How do you clear the Open Graph cache of an URL on Telegram?

半城伤御伤魂 提交于 2019-12-02 17:29:19
When I send a new link on Telegram, it automatically reads Open Graph data of the URL and generates a preview of the page. When the Open Graph data of the same page changes, though, Telegram doesn't update its preview: it has cached the old Open Graph data! How do you clear the Open Graph cache? Preview Example: For the URL https://asp.net/ Telegram is reading the following tags: <meta property="og:site_name" content="Microsoft"> <meta property="og:title" content="ASP.NET | Open-source web framework for .NET"> <meta name="twitter:image" content="https://dotnet.microsoft.com/images/redesign