telegram

How to use Telegram API in C# to send a message

送分小仙女□ 提交于 2019-11-28 20:23:30
问题 I want use Telegram API in C# for send a simple message to a number. I found some lib's on GitHub but I am not able to use them. Can anyone give a simple code ? Can I simply make HTTP calls ? 回答1: Install-Package Telegram.Bot Create a bot using the botfather get the api key using the /token command (still in botfather) use this code: var bot = new Api("your api key here"); var t = await bot.SendTextMessage("@channelname or chat_id", "text message"); You can now pass a channel username (in the

Using Telegram API for Java Desktop App?

爷,独闯天下 提交于 2019-11-28 17:53:32
I am not that new to Java Programming, but I have never worked with external libraries etc. Now I want to develop a desktop client for the "Telegram" open-source messaging platform, and I'm stuck when it comes to API-Usage. There is pretty much documentation about the Telegram API, found at https://core.telegram.org/api , and I've already downloaded mtproto, telegram-api and tl-core from github, and compiled my own library jar from source by using gradle. As well, I've already written a small application, where the user clicks a button and is promted to enter his phone number, I'm using the

Sending messages with Telegram - APIs or CLI?

梦想的初衷 提交于 2019-11-28 16:13:33
I would like to be able to send a message to a group chat in Telegram. I want to run a python script (which makes some operations that already works) and then, if some parameters have some values the script should send a message to a group chat through Telegram. I am using Ubuntu, and Python 2.7 I think, if I am not wrong, that I have two ways to do that: Way One: make the Python script connect to the Telegram APIs directly and send the message ( https://core.telegram.org/api ). Way Two: make the Python script call the Telegram's CLI ( https://github.com/vysheng/tg ), pass some values to this

Is there any size limit to post a file using curl?

99封情书 提交于 2019-11-28 07:13:14
问题 I need to post files up to 50mb to telegram bot api. Now I'm using Curl and everything tested and passed successfully. Means that I can only send small files (I coudn't send 8.1mb file in my test). So if I send large files (lets say more than 8mb) all $_POST variables are empty, means nothing posted. Question: Is there any limitation in sending file using curl? Because I asked my server administrator to increase related configuration in php.ini , but they replied that is not php.ini 's

How do I add my bot to a channel?

落爺英雄遲暮 提交于 2019-11-28 03:38:40
I'm using my bot to tell important news, but when I using sendMessage to the channel I'm receiving the following error: {"ok":false,"error_code":403,"description":"Error: Forbidden: bot is not a participant of the channel"} In the Change Log they mention it's not possible via the client to send a message to a channel, but then what is the other way to do that? So, the question is, how to add my bot to the channel? Now all clients allow to do it, but it's not pretty simple. In any Telegram client: Open Channel info (in app title) Choose Administrators Add Administrator There will be no bots in

create dynamic Keyboard telegram bot in c# , MrRoundRobin API

荒凉一梦 提交于 2019-11-27 23:15:42
I want to create custom keyboard in telegram.bot For example: We have an array of string that gets from the database or other recurses how we can push data from the array to InlineKeyboardMarkup in for loop or function //array of Button string[] ButtonItem= new string[] { "one", "two", "three", "Four" }; //function or solution to create keyboard like this var keyboard = new InlineKeyboardMarkup(new[] { new[] { new InlineKeyboardButton("one"), new InlineKeyboardButton("two"), }, new[] { new InlineKeyboardButton("three"), new InlineKeyboardButton("Four"), } }); You could use a separate function

Sending messages with Telegram - APIs or CLI?

倖福魔咒の 提交于 2019-11-27 19:51:40
问题 I would like to be able to send a message to a group chat in Telegram. I want to run a python script (which makes some operations that already works) and then, if some parameters have some values the script should send a message to a group chat through Telegram. I am using Ubuntu, and Python 2.7 I think, if I am not wrong, that I have two ways to do that: Way One: make the Python script connect to the Telegram APIs directly and send the message (https://core.telegram.org/api). Way Two: make

Android - Send Telegram message to a specific number

时光总嘲笑我的痴心妄想 提交于 2019-11-27 17:55:01
问题 I'm trying to send a Telegram message to a specific number from within my Android app. Right now my code launches Telegram app, and then the user has to select the destinatary. What I want to do is to send the message to the specified number, without having the user select the contact. My code is as follows: /** * Intent to send a telegram message * @param msg */ void intentMessageTelegram(String msg) { final String appName = "org.telegram.messenger"; final boolean isAppInstalled =

Telegram bot - how to get a group chat id?

旧街凉风 提交于 2019-11-27 16:52:17
i've been using telegram_bot , and trying to get groupChat id to send notifications to group chat , but don't know which methods i have to use for it. For getting chat id i use to message.chat.id when the bot participated in the chat but which i have to use for getting group chat id can't find/ Maverick_Java In order to get the group chat id, do as follows: Add the Telegram BOT to the group. Get the list of updates for your BOT: https://api.telegram.org/bot<YourBOTToken>/getUpdates Ex: https://api.telegram.org/bot123456789:jbd78sadvbdy63d37gda37bd8/getUpdates Look for the "chat" object: {

Open telegram channel in android

不打扰是莪最后的温柔 提交于 2019-11-27 13:55:24
问题 In my app want to use Intent to open specific telegram channel or telegram group. i search in SF but i can't find anything.i try to implement but i only can open all messenger apps that user can choose but not telegram or specific telegram group or channel. if find this on sf but it's not answer to my question. Intent myIntent = new Intent(Intent.ACTION_SEND); myIntent.setType("text/plain"); myIntent.setPackage(appName); myIntent.putExtra(Intent.EXTRA_TEXT, msg);// mUIActivity.startActivity