6,162 questions
0
votes
1
answer
66
views
Pyrogram does not recognize message_entities
I have a problem with forwarding messages with caption_entities. Attached below is the code that I use to make the transfer itself, as well as the result of its operation. The result shows that ...
0
votes
1
answer
44
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 ...
1
vote
0
answers
70
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(
&...
0
votes
0
answers
32
views
Issues with folder selection via webkitdirectory and File System Access API in Telegram Mini Apps on Android
I'm facing a confusing and frustrating issue with folder selection for file uploads in a web app running inside Telegram Mini Apps on Android.
Folder selection works fine in regular browsers (Chrome ...
-3
votes
0
answers
52
views
How to paginate a chat conversation list (1,000+ threads) so new messages move the thread to the top without breaking pagination?
I’m building a chat app using Node.js, Express, MongoDB, and Socket.io. Right now, I load all conversations (around 1,000+) at once, and it’s making the app slow.
I want to add pagination to the ...
1
vote
2
answers
58
views
How to Approve Channel Join Requests Using Telethon?
I'm trying to approve join requests for my private Telegram channel using Telethon. When a user opens a join link to a private channel, Telegram sends their request to the admin panel, where it can be ...
1
vote
1
answer
106
views
The Pyrogram client does not recognize the id of the channel it created
Below are two scripts. The first one creates a channel, after which it stops working. The second script tries to send a message to this channel, but at the moment of sending, the second script ...
2
votes
1
answer
106
views
Why does await client(...) in Telethon work but give an __await__ warning in my IDE?
I'm learning Telethon and have encountered some confusing IDE behavior. My asynchronous code to call Telegram API methods works perfectly, but my IDE (PyCharm) shows a warning:
Class 'TelegramClient' ...
0
votes
1
answer
68
views
Media files are not being sent in Pyrogram
Here's my code. When I run it, it only displays "Sending" and that's it. I don't understand what the problem is.The id passed to the function and the path to the photo have been changed for ...
2
votes
1
answer
69
views
Pyrogram bot doesn't send downloaded media
I have a set of functions written in Pyrogram that make up a user bot that copies media messages from one Telegram channel to another. The problem is that it doesn't copy the media messages in the ...
0
votes
1
answer
94
views
Scraping only user with username telegram
I want to be scraping only user with username on telegram, can you help make my code better?
I'm a novice, my code is scrap, everyone. Can you tell me what I need to modify? Thank you very much.So if ...
1
vote
0
answers
194
views
How can I find out the actual price of an NFT gift in Telegram using Python?
I'm writing a webapp bot in Python, Aiogram, and DRF. I've encountered a problem getting the REAL price of gifts in Telegram. The price list on the official marketplace and Telegram's API is far from ...
0
votes
0
answers
58
views
Cannot integrate TDLib in Xcode 16.3
I’m trying to use TDLibKit (Swift wrapper for Telegram Database Library) in a SwiftUI project on an Intel Mac.
I added TDLibKit via Swift Package Manager, which depends on TDLibFramework.
...
3
votes
2
answers
884
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>/...
2
votes
0
answers
147
views
How to implement multi-select inline buttons in Telegram bot with checkmarks using aiogram
I am trying to create a Telegram bot using aiogram v3 where users can select multiple products from a list. I want the following behavior:
Users see a list of products as inline buttons.
When a user ...
1
vote
0
answers
124
views
Telegram links not opening in iPhone (React)
I encountered the link opening problem when I was trying to open a link in asyncronous method (opening as about:blank)
axios
.get(`https://linkmanurl.vercel.app/api/click/getlink/${encryptedCode}`)
...
1
vote
0
answers
63
views
Aiogram: why does @router.message(F.successful_payment) not fire after Telegram test payment?
I’m testing Telegram Payments in a bot built with Aiogram 3.x.
Environment: Python 3.11, Aiogram 3.4, provider = Smart Glocal TEST token from BotFather.
The invoice shows and the test payment ...
0
votes
0
answers
142
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 ...
1
vote
1
answer
125
views
InlineKeyboardButton with callback_data doesn't work
InlineKeyboardButton with callback_data doesn't work. When I click on it, nothing happens.
Here is how I create the button:
from django.apps import apps
from asgiref.sync import sync_to_async
from ...
0
votes
0
answers
75
views
Telethon download custom emoji as .tgs files
I'm using Telethon 1.40.0 and python 3.13 to try and download the .tgs file from a CustomEmoji
example code:
@client.on(events.NewMessage(chats=accepted_chats))
async def handler(event):
id1 = ...
0
votes
1
answer
151
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-...
2
votes
1
answer
155
views
Get telegram's chat's history
I want to get some previoius messages from chat with Python telegram bot's library.
Here is my bot's handler:
class BotController:
def __init__(self) -> None:
self.token = os.getenv(&...
0
votes
1
answer
118
views
How to reply to direct user messages?
I am developing a Telegram business chatbot using n8n for automating replies to users in private messages.
Below is some context and the issue I’m struggling with.
Background
In May 2024, Telegram ...
0
votes
0
answers
78
views
TypeError: Api.payments.SendStars is not a constructor when sending Telegram Stars gift with GramJS (telegram.js)
I'm trying to write a NodeJS script using the telegram library (v2.x) to buy a Telegram Stars gift for my own user account.
I can successfully connect, log in, and fetch the list of available gifts ...
0
votes
0
answers
582
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
63
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
433
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
...
1
vote
0
answers
66
views
Polling + Webhook behind NGINX, slow updates on production
Setup:
Telegram bot built with aiogram (Python 3.10)
Main bot works via long polling
Additional bots (inviters) connect to the main bot
Inviters generate invite links to private channels and accept ...
0
votes
0
answers
134
views
Telegram Mini App opens in full screen instead of compact drawer view (WebView height issue)
I am building a Telegram Mini App. I want it to open in a half-screen drawer (compact mode), not in full screen.
Here’s what I’ve done:
Set the Mini App mode to compact using BotFather: BotFather → ...
1
vote
1
answer
206
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
1
answer
66
views
How to get Telegram dialog icons as remote URLs using WTelegramClient (C#)
I'm using the WTelegramClient library in a .NET application to load all my Telegram dialogs and their recent messages. I want to get the avatar (profile picture) of each dialog as a remote Uri, not ...
0
votes
0
answers
89
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
1
answer
127
views
Telegram login payload hash verification in Java
I am new to using Telegram and I'm trying to validate the hash provided by Telegram's initData for a webapp mini app (not the login widget) in Java, using the steps from the official Telegram ...
0
votes
0
answers
37
views
Web app with app router: how to make telegram fullscreen on a phone?
On my bot side, I am sending an InlineKeyboardButton with an app router link with couple of parameters
webapp_url = f'{base_url}/?param1={rid}¶ma2={uid}'
I want to be able to open it full ...
0
votes
0
answers
63
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
1
answer
388
views
Bad Request: chat not found, error_code:400, i am have issue while sending message on telegram
I am working on a project where I want to send all the reminders due in 3 days from now, but I am facing a problem. I have an error code 400 while sending the message on Telegram (for which I am using ...
0
votes
1
answer
70
views
Problem with <input type=file> on mac in telegarm web app
I have problem in telegram web app on macOS (Vue js). If i use input with type file, then click and choose nothing - input don't work again.
<template>
<div>
<button @click="...
0
votes
0
answers
69
views
How do Telegram bots see messages from other bots?
According to the FAQ: Bots talking to each other could potentially get stuck in unwelcome loops. To avoid this, we decided that bots will not be able to see messages from other bots regardless of mode....
0
votes
0
answers
91
views
Can't use TonConnect in Telegram Webapp
I am trying to use the tonconnect ui-react library to connect a wallet to my Telegram webapp project. I did as in this link https://docs.ton.org/v3/guidelines/ton-connect/frameworks/react. When I try ...
0
votes
0
answers
61
views
Ton Connect (@townsquarelabs/ui-vue) infinite list loading
I have a Telegram Web App project on Vue3 with the TON wallet connection (@townsquarelabs/ui-vue)
When I clicked on the “Connect Wallet” button, a list of available wallets used to appear and ...
0
votes
0
answers
49
views
How can I get user's message and put it into a variable in bot Telethon?
I'm making telegram bot using Telethon and I want bot to request users's name (not username or first_name; it's like nickname which user can make by himself). And then bot whill use this name.
For ...
0
votes
0
answers
96
views
Proxy works in checker tools but fails in Python (Telethon) with "GeneralProxyError: Socket error: timed out"
I'm trying to connect to Telegram using Telethon with a SOCKS5 proxy, but I keep getting GeneralProxyError: Socket error: timed out after multiple attempts.
The proxy is verified working in online ...
0
votes
0
answers
107
views
Python telebot inline buttons do not response for some reason. Button handlers not responsing
Python 3.13.2,
pyTelegramBotAPI-4.27.0,
Windows 10
I have a problem with Python telebot inline buttons. It worked fine for a long time, without any problems. At some point it stopped to work. I did ...
0
votes
1
answer
215
views
How do I get the FSM context to pass to my function?
Utilities.py
import aiogram
import aiogram.filters
import aiogram.types
import aiogram.fsm.context
import aiogram.fsm.state
from aiogram.fsm.storage.redis import RedisStorage
import redis.asyncio as ...
0
votes
2
answers
361
views
How to Make Telegram Bot CA Text Tappable to Copy to Clipboard with Notification Using node-telegram-bot-api?
I’m building a Telegram bot using node-telegram-bot-api in Node.js to send transaction notifications on the Solana blockchain. Each transaction message includes a Contract Address (CA), and I want the ...
-5
votes
1
answer
98
views
What Danger am I Inviting if I Store Telegram User IDs Unhashed/Unencrypted in a Database? [closed]
I am working on a bot that echoes the latest YT video title of a specific Youtube Channel to its users. However, it will only echo the video title only if it contains at least one of the user's ...
0
votes
0
answers
49
views
How can I prevent and/or catch the iframe doing the top-level redirect in Safari?
In our Telegram WebApp I open an iframe to another website, and it does a top-level redirect after the form is submitted (i.e. it redirects our WebApp URL, not the iframe). I tried using service ...
1
vote
1
answer
274
views
python-telegram-bot Inline Buttons Unresponsive After Long (~5+ hours) Delay
I'm developing a Python application (using PySide6 for the GUI) that interacts with users via Telegram using python-telegram-bot version 13.7. The application runs automated workflows that can take ...
0
votes
1
answer
103
views
Is there a single way to store different media types in Telegram bot?
I'm doing different Telegram bots, that can send media to their users.
For video files I used this code to store video uploaded by admin:
caption = event.message.text or ""
file_id = event....
2
votes
0
answers
39
views
Bot Doesn't Start When Including CRM Router
I'm building a Telegram bot using Aiogram, and I'm encountering a problem where my bot doesn't start when I include the crm_router. However, when I replace it with auto_responder_router, everything ...