319 questions
3
votes
1
answer
113
views
WTelegramClient: Intermittent Auth_SentCode success — code arrives "via App" but is missing after periods of inactivity
I am using WTelegramClient in a C# / .NET 9 environment to manage multiple user sessions (userbots). I am encountering a strange, intermittent issue with the login flow that I can't pin down.
The ...
-2
votes
2
answers
191
views
Telegram NewMessage Event Handler Not Firing for Large Supergroups (GramJS)
I'm using GramJS (telegram npm package) to listen for new messages in Telegram groups. The NewMessage event handler works perfectly for:
Direct messages (DMs),Small groups (< 1000 members),Medium ...
Best practices
0
votes
0
replies
96
views
Telegram Bot API: how to send an image/album with a caption longer than 1024 characters?
According to the official Telegram Bot API docs, media captions are limited to 0–1024 characters after entities parsing.
However, I recently saw a forwarded bot message that looks like a single media ...
-1
votes
1
answer
117
views
Telegram nodeje api: getting 400 CONNECTION_NOT_INITED error
I've got a function to download an image from telegram message, it accepts message.media.photo:
const downloadPhoto = async (photo, client, name) => {
await client.connect();
const file = new ...
0
votes
0
answers
96
views
Pyrogram client appears as “Envoy Telegram Desktop/Android” — how can I remove the “Envoy” prefix?
I’m testing a simple Pyrogram client and noticed something strange when the session appears in Telegram’s Active Sessions list.
Here is my test code:
from pyrogram import Client
app = Client(
&...
3
votes
2
answers
1k
views
Telegram bot api getUpdates or SendMessage doesn't work on browser
I created a Telegram bot using the Botfather and got token for that bot.
Visiting the following url in browser worked fine to send message on Telegram.
https://api.telegram.org/bot<123:Token>/...
0
votes
0
answers
177
views
Initializing Mini Apps in C# WASM app with Avalonia.Browser
In Telegram docs, https://core.telegram.org/bots/webapps#initializing-mini-apps,
To connect your Mini App to the Telegram client, place the script telegram-web-app.js in the <head> tag before ...
0
votes
1
answer
162
views
create/update main menu based on user's preferred language
I would like to customize the main menu texts based on the customer language preference, but I have not seen any document about how to create / update the main menu using java.
I can create Inline-...
0
votes
0
answers
748
views
How to Retrieve the Telegram Store Gift Catalog via Bot API for a Business Account?
[Description:
Hello, Stack Overflow community! I am developing a Telegram bot using Python with the python-telegram-bot librarythat interacts with a business account to send gifts to users. The ...
1
vote
1
answer
73
views
Is accessing details of message replied from another chat possible
I am using the python-telegram-bot package to develop a Telegram bot.
I was wondering if it's possible to access the details of a message that has been replied to from another chat?
Broader ...
1
vote
1
answer
667
views
Eror Sending Telegram Gift: RPCError 400: PAYMENT_REQUIRED (caused by TransferStarGiftRequest)
I'm writing a function that takes as input the tg session (client), to_user (InputPeer) and gift (the gift we are sending) and sends the corresponding gift to the user to_user from the client account
...
0
votes
1
answer
169
views
Get messages from a specific topic in a group
I currently have a service in docker, the purpose of which is to retrieve the data I have in a private group I have (forum), where I store all my personal data, and then save them on my local server.
...
1
vote
1
answer
303
views
Userbot Telegram API
I am creating a userbot. I can't figure out how to implement it: when I am offline from Telegram (I exit the app), it automatically changes the name in one way and when I am online in another. I can't ...
0
votes
0
answers
111
views
How to monitor new users joining a Telegram channel using Telegram API?
I'm trying to track new users joining a Telegram channel (not a group) using the python-telegram-bot library (v20.x). My bot is an admin in the channel, but it doesn't detect new_chat_members events.
...
0
votes
0
answers
87
views
How to create a Telegram user mention link that works across all devices and profile types in a bot message?
I'm developing a Telegram bot, and I want to generate clickable user mentions in admin reports. These mentions should:
Link to the user's profile
Work on all platforms
Handle any kind of Telegram ...
0
votes
0
answers
100
views
SendMultiMediaRequest fails silently when sending multiple files [Python/Telethon]
I'm trying to use the SendMultiMediaRequest function from the Telethon library to send a Telegram message that includes several images and some text.
However, the request doesn't work as expected — no ...
0
votes
1
answer
181
views
Callable Telethon function
relayer.py
async def send_gift(username, gift_id=config.teddy_id):
client = TelegramClient(session_name, api_id, api_hash)
client.start(phone=config.phone, password=config.two_factor)
...
0
votes
0
answers
72
views
Why does the Telegram client connection drop unexpectedly during execution in Telethon?
I'm using the Telethon library to interact with Telegram's API. Initially, after calling await tel_channel_access(), the client is successfully connected to the server. However, just before running ...
0
votes
2
answers
162
views
Issue with IAP (Telegram Stars) on Android
I have a game in development for Telegram, using Unity3D, and I want to integrate IAP (Telegram Stars) into the game,
The flow is as following:
user click on in-game item
the game call Telegram API ...
-1
votes
2
answers
846
views
Send invoice using Telegram Stars (XTR) currency not working as expected
I am building a Kotlin telegram bot using the latest version of this Java SDK.
I am trying to send an invoice using Telegram internal currency stars
Their official docs say that in order to do this ...
0
votes
1
answer
254
views
How to solo-test a telegram bot within a group as multiple users
I made a Telegram bot with python-telegram-bot library, and I want to test it in a group where it has to interact with many users at the same time. Because I cannot test it only by myself (I have only ...
0
votes
1
answer
124
views
Pyrogram premium or custom reactions
I need to send premium reactions to messages, but send_reaction() only accepts emojis as a string, how can I specify a premium reaction in send_reaction()?
0
votes
1
answer
77
views
Limiting Telegram Group Access to a Single Device with Bot API
I am developing a Telegram bot using the Telegram Bot API. The bot is an admin in my Telegram group. I need the members to access messages, interact with the group, and read messages only from one ...
0
votes
1
answer
99
views
How do I get a phone_number field in enum MessageEntityType in Pyrogram Python?
I want to understand how Pyrogram works. So I tried to get a phone number from the group for educational purposes, similar to what I successfully did with an url.
def main():
with app: ...
1
vote
0
answers
105
views
How to suppress "Traceback" when it loses connection with Telegram bot
I'm developing and building a Python script for Telegram bot. I was adding the following codes in a script to report any error via output from Linux terminal:
logging.basicConfig(
format='%(...
0
votes
2
answers
3k
views
How to run Telegram mini app in full-screen landscape mode?
I am making a mini app game for Telegram. It runs in full-screen mode using recently announced new API functions. The game interface is originally designed for landscape screen mode. Accordingly, if ...
0
votes
1
answer
131
views
Send gif animation by telethon?
I use the telethon library to send media files. Videos and images work fine through
async def send_media(self, chat_id: int):
async with self._get_client() as client:
chat = await client....
0
votes
1
answer
1k
views
Telegram Mini App: can't transfer data from mini app to bot
I am writing a bot for Telegram using the python-telegram-bot library. I am connecting mini app to it. The application starts and can even receive data from the bot, but for some reason the data does ...
2
votes
0
answers
133
views
Nginx proxy_pass to Telegram Bot API causing intermittent timeouts when adding Telegram server
I am using Nginx as a reverse proxy to forward requests to Telegram Bot API in order to reduce rate-limiting on my server. My Nginx configuration works fine when I only proxy to my local Bot API ...
-1
votes
1
answer
97
views
how to listen updates from telegram and send the msg to a group on fulfilled conditions with telethon library
i want to listen updates from telegram and send the msg to a group on fulfilled conditions simultaneously but i am not able to do both together i am facing issue with client connection
I am using this ...
3
votes
1
answer
510
views
Telegram Bot API: Create a link to a specific message in a private chat with a chatbot
I'm working on a telegram chatbot that accepts applications, and the application is sent as a chat message to a potential performer. After that, at some point in time, the manager appoints an ...
0
votes
1
answer
993
views
telethon RPCError 400: STARGIFT_USAGE_LIMITED (caused by SendStarsFormRequest)
I have an error that I stumble upon. I can't figure out if there's something wrong with my code, or if this error occurs because I've tried to make an incorrect request from this account many times ...
0
votes
1
answer
211
views
How to get more than 200 members from a Telegram group?
I don't understand why it's not possible to retrieve more than 200 members from a Telegram group. The only thing that seems to work is iterating through a filter, but it doesn't return deleted ...
0
votes
1
answer
335
views
Telegram Login Widget on Native Apps - Broken fragmet
I'm trying to use Telegram Login Widget on Native App made with Ionic.
I'm using a InAppBrowser to open the auth page, after the Telegram Verification completes,
I get redirected to my redirectUrl ...
0
votes
1
answer
225
views
Hebrew is aligned incorrectly (LTR) via Telegram bot API
When using Telegram bot API the text in Hebrew should be aligned RTL. Instead it is aligned incorrectly in LTR.
Request:
POST /botXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXX/sendPhoto HTTP/1.1
Host: api....
0
votes
1
answer
2k
views
Telegram MiniApp: How do I share media to users from within the MiniAPP?
Telegram MiniAPP shareMessage
I see that telegram has added shareMessage and I tried using this method to send a message with an image that I wanted to provide. But I cannot find any examples and I ...
0
votes
0
answers
351
views
Telegram integration with Google Sheets
First post here, not sure how to format my question, but I am trying to make a Telegram Bot, which takes information from messages posted in my Telegram channel, and then puts them into my Google ...
0
votes
1
answer
101
views
WTelegramClient Messages_GetBotCallbackAnswer always throw BOT_RESPONSE_TIMEOUT exception
im trying to write simple bot on C# .net8-0 and im need to press some inline buttons in messages, but im always see error BOT_RESPONSE_TIMEOUT, here is my code
bool result = false;
if (GetInputPeer(...
0
votes
3
answers
438
views
Validating data received via the Mini App does not work
I have problem with this method in my telegram mini app:
https://core.telegram.org/bots/webapps#validating-data-received-via-the-mini-app
When client trying to log in into my mini app frontend sends ...
1
vote
0
answers
82
views
Long Processing Telegram API Event Using Telethon Library
I wrote this message edit event handler for printing the content of edited message (from public tg channel) right to my console and then putting it in chatgpt prompt through g4f library for getting an ...
0
votes
1
answer
391
views
Telegram doesn't send OTP to mobile in `WTelegramClient` library [closed]
I'm trying to build an automated bot using WTelegramClient that forwards messages from one Telegram group to another. The process works fine for existing accounts, but I encounter a problem when ...
1
vote
0
answers
242
views
how to use telethon(tdlib python impl) send_message to a topic
I am writing a simple Telegram message handler using the Telethon library
I'v already used the code below to forward to the specified topic
await client(
ForwardMessagesRequest(
from_peer=...
-2
votes
1
answer
278
views
How to see an actual raw HTTP request of sendInvoice going to the Telegram Bot API on Python?
Example of my code:
import json
from telegram import Bot, Update, LabeledPrice
from telegram.ext import ContextTypes
PAYMENT_SYSTEM_TOKEN = '000000000000000'
INVOICE_PAYLOAD = 'Payload-Testing'
...
0
votes
0
answers
1k
views
How can I avoid being hit with Telegram Flood Wait limit when trying to join multiple groups using their invite links?
I'm trying to join a lot of telegram groups on one account. I've made a script in python that uses telethon to do the job but it fails miserably and gets rate limited extremely fast.
Ignore the "...
0
votes
1
answer
1k
views
How to export tdata of telegram to session of WTelegramClient
I want to transfer session from telegram desktop or mobile in folder tdata to telegram session of WTelegramClient how can i do this.
Thanks
I tried to find a way to use opentele to move the tdata ...
0
votes
1
answer
289
views
Can I trust the callback query from Telegram? Should I validate the query?
In a traditional Web application, the backend service should never trust the payload sent from the user frontend. Though the frontend pages use carefully designed UI to force users to send data in a ...
3
votes
1
answer
154
views
Unable to Download Multiple Images from Telegram Media Group Using Async Function
This question is a follow up from this question asked earlier here
I need help in trying to modify this code section which I am currently using to download just 1 image.
async def handle_s_command(...
2
votes
1
answer
781
views
Getting multiple images to download from telegram bot
I have this code
file_name = f'photo_{update.message.message_id}_{photo.file_unique_id}.jpg'
full_download_url = f"https://api.telegram.org/file/bot{BOT_TOKEN}/{download_url}"
logger.info(f'...
0
votes
1
answer
97
views
Telegram BOT command in GoogleAppScript not triggerred
I have a problem with my code where the command is not triggerred properly. Here's my code.
function handleInitialCommands(receivedTextMessage, chatId, messageId) {
if (receivedTextMessage....
0
votes
1
answer
746
views
Telegram Show Popup message box use telegram api and telebot in python
how to show popup message box in telegram, use telebot python library like below picture:
enter image description here
Or give me a keyword related to this message box so that I can search about it ...