I noticed that Telegram recently released their app marketplace where you can view user statistics for different bots. I’m wondering if there’s a method through the Telegram Bot API to programmatically get the user count for my specific bot?
I’ve been searching through the official documentation but can’t seem to find any endpoint or method that returns this data. Has anyone figured out how to access these user metrics? I’m also curious about how exactly Telegram calculates these numbers - is it total users who ever interacted with the bot, or just active users?
Any help or guidance would be really appreciated since I need this information for analytics purposes.
Telegram doesn’t expose user counts through their Bot API - I’ve hit this same wall building dashboards for clients. Those marketplace stats you see are just frontend displays with no API behind them.
Honestly, custom user tracking works better anyway. You get way more control over the data. I usually just log user interactions to a simple database table with timestamps. Then I can calculate daily/monthly active users, growth rates, churn - whatever I need.
Just define what counts as a “user” upfront. Is it anyone who hit /start once? Or only people active in the last 30 days? Also heads up - user IDs can change if someone deletes and recreates their account, so build your analytics with that in mind.
yea, totally get it. the api doesn’t show user count directly. what most of us do is track user ids when folks first hit the bot. it’s a hassle, but that’s the workaround we got for now.
Nope, there’s no official API for Telegram user stats. Hit the same wall building analytics for my bot last year. Those marketplace stats you’re seeing? Web interface only - can’t pull them programmatically. I ended up rolling my own tracking system. Just store unique user IDs in a database when someone first messages your bot. Then you control what counts as an “active” vs “total” user. Plus you can track daily actives, retention, engagement patterns - whatever you need. More upfront work, but you’ll get way better analytics than Telegram would give you anyway.