Get a bot user
GET
https://api.vidmoat.com/v1/telegram/users/{user}One person, by numeric Telegram id or @username, with their standing, daily limit and usage. Works for somebody allowed before they ever messaged the bot.
Path parameters#
userstringrequiredA numeric Telegram user id, or an @username (4 to 32 letters, digits and underscores; send the @ as%40or leave it out).
Response#
Returns 200.
Response 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.
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. |
| 400 | invalid_request | user is neither a numeric id nor a valid username. |