List bot users
GET
https://api.vidmoat.com/v1/telegram/usersThe people who used the bot, 25 a page. Search with q (name, @username or id), sort=last_seen or spend.
Query parameters#
qstringSearch by Telegram id, @username or name.sortenumdefaultlast_seenspendis highest 30-day credits first.One oflast_seen,spendpageintegerdefault11-based page number.
Response#
Returns 200.
Response fields#
objectstringlist.dataarrayPeople.Show 15 child fields
objectstringAlwaystelegram_user.idstring or nullVidmoat id of the person.nullfor somebody who has not used the bot yet.telegram_user_idstring or nullNumeric Telegram id, as a string.usernamestring or nullTelegram @username, without the @.display_namestring or nullTheir Telegram name.statusenumWhether they are blocked.One ofactive,blockedallowlistedbooleanOn the bot's allowlist.daily_creditsinteger or nullTheir own daily credit limit.nullmeans the bot's default.first_seen_atstring or nullISO 8601 time of their first message.last_seen_atstring or nullISO 8601 time of their latest message.projectsintegerProjects they have. Omitted for somebody who has not used the bot.messages_todayintegerSince midnight UTC. Omitted for somebody who has not used the bot.messages_30dintegerLast 30 days. Omitted for somebody who has not used the bot.credits_todayintegerCredits spent since midnight UTC. Omitted for somebody who has not used the bot.credits_30dintegerCredits spent in the last 30 days. Omitted for somebody who has not used the bot.
pageintegerThis page.pagesintegerTotal pages (at least 1).page_sizeintegerAlways 25.totalintegerPeople matching.sortstringThe order used.
Errors#
Besides the errors any request can get (authentication, rate limits):
| Status | Code | When |
|---|---|---|
| 404 | not_found | The key is not minted for an app you own (a personal key, for example). Use a key from the app whose bot you manage. |