Questions tagged [telegram]

Telegram is a cross-platform cloud-based instant messenger with a focus on security. Use this tag for questions about interacting with Telegram, including use of its official API.

Main features

Messaging

It was the main feature of Telegram. It allows you to send messages to users who have the contacts and we know the nickname.

Groups

The groups are conversations between more than two users, I can reach up to 200 users. Each member of a group can add users, change the name of the group or avatar. Exceeded 200 members, the group becomes a "Supergroup". The supergroup can get to 100,000 users.

Channels

The channels are groups that do not have a limit of users . The peculiarity is that only administrators can write to the channel.

Bots

Telegram Bots are programmed accounts without a phone number. they can not initiate a conversation with a real user. The bot API provides methods to interact with users including sending and editing messages, custom keyboards, commands. (API Documentation)

5905 questions
14
votes
4 answers

how to use setwebhook in telegram?

Hello I'm creating a bot in telegram. I send a http request: https://api.telegram.org/bot(mytoken)/setWebhook?url=https://mywebpagetorespondtobot and I receive this: {"ok":true,"result":true,"description":"Webhook was set"} but It doesn't work.I…
amir mola
  • 355
  • 1
  • 4
  • 17
14
votes
1 answer

Telegram API with PHP not bot

app using Ionic and have a PHP api backend for this app. We need to integrate Telegram API messaging in this app, I need to use the API and not bot as we need to retrieve the users contacts to allow them to send new private message. I have spent…
Billy Mahmood
  • 1,857
  • 5
  • 26
  • 37
14
votes
4 answers

Telegram BotApi, Send message to multiple chat_id

I was wondering if I could send a message with my bot on telegram bot api, to multiple chat_id, but I cant figure it out. that's totally because of telegram apis are so hard to understand. I have used this for send a message to one…
Pejman
  • 2,442
  • 4
  • 34
  • 62
13
votes
2 answers

How to get a message from Telegram groups by API?

I was looking for some way to listen and catch new messages provided by telegram groups. I have not found libraries or API in order to do this in Python. Someone having any suggestion?
RedVelvet
  • 1,683
  • 3
  • 15
  • 24
13
votes
3 answers

How to get the user's name in Telegram Bot?

I'm working in Telegram bot with a handler. where I need to get the user's name or users id once they use the command. MY CODE import telebot #Telegram Bot API bot = telebot.TeleBot() @bot.message_handler(commands=['info']) def…
13
votes
6 answers

How to get all users in a telegram channel using telethon?

I'm new to telethon and python. I have installed telethon in python3 and I want to get all members of a telegram channel or a group . I was searching a lot in the internet and found below code . And I'm trying really hard to understand it .Telegram…
lasan
  • 365
  • 2
  • 5
  • 13
13
votes
1 answer

How many telegram bots can I create?

Is there a limit to the number of bots a user can create on telegram? I'm considering "selling custom bots" to people as a service, and would like to avoid having my clients handle technical stuff like api keys or "talking to botfather". So I would…
Roman
  • 5,888
  • 26
  • 47
13
votes
1 answer

telegram bot prefill text for user to edit

Telegram bot sends me a message with a text snippet, which I want to edit, and send back to the bot for further processing. Copy and paste takes time. Typing message anew takes time. Ideally I'd like to press an inline button "Edit" on the bot's…
Alexander Gorshenev
  • 2,769
  • 18
  • 33
13
votes
2 answers

Sending animated GIFs with sendPhoto (Telegram bot)

I'm trying to send an animated GIF with sendPhoto (Telegram's Bot API) with this request: https://api.telegram.org/bot/sendPhoto?chat_id=&photo=http://i.giphy.com/13IC4LVeP5NGNi.gif That method works, as in, I get ok:true back, but…
m52go
  • 343
  • 1
  • 3
  • 14
13
votes
1 answer

Telegram API vs Bot API

Can you help me understand the differences for Telegram API vs Bot API please, I tried telegram website but just get confused? Thanks Ramin
Ramin Rabii
  • 359
  • 4
  • 14
13
votes
1 answer

How do I get the user picture/avatar using the Telegram bot chat API?

The user object has no photo_id, so is there way to get the user's avatar?
Antonio Carlos Ribeiro
  • 86,191
  • 22
  • 213
  • 204
13
votes
4 answers

How to get the right telegram channel id?

If I get user_id, by contacts.resolveUsername#bf0131c and search by string channel, then I get user_id = 0x0827ac18 If send it to messages.getFullChat#3b831c66, then receive error PEER_ID_INVALID. If send if to users.getFullUser#ca30a5b1, then I…
SkyN
  • 1,417
  • 4
  • 17
  • 32
13
votes
2 answers

How to launch Telegram app from my own android application?

I have an android app that should be able to open a chat in the telegram app by pressing a button. I want to open an existing robot chat page DIRECTLY from my app. I have a valid token for my robot. How can this be achieved? Thanks in advance. robot…
BoshRa
  • 778
  • 1
  • 8
  • 15
13
votes
4 answers

Telegram bots: How do you remove a command with botFather

I am trying to erase all commands from my bot using botFather. I couldn't find docs for this. There is an option to send a new list of commands to the BotFather, however this does not help me as my bot doesn't have any commands as I am working with…
Guy
  • 12,488
  • 16
  • 79
  • 119
13
votes
6 answers

Telegram C# example send message

I can't find an example of sending message by telegram protocol from C#. I tried to use this but failed. Can you give me any examples?
Piter Griffin
  • 179
  • 1
  • 1
  • 3