Skip to content

Get a bot user

GEThttps://api.vidmoat.com/v1/telegram/users/{user}
Bearer tokenScope telegram.users.readFreeTry it in the playground

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#

  • userstringrequired
    A numeric Telegram user id, or an @username (4 to 32 letters, digits and underscores; send the @ as %40 or leave it out).

Response#

Returns 200.

Response fields#

  • objectstring
    Always telegram_user.
  • idstring or null
    Vidmoat id of the person. null for somebody who has not used the bot yet.
  • telegram_user_idstring or null
    Numeric Telegram id, as a string.
  • usernamestring or null
    Telegram @username, without the @.
  • display_namestring or null
    Their Telegram name.
  • statusenum
    Whether they are blocked.
    One of active, blocked
  • allowlistedboolean
    On the bot's allowlist.
  • daily_creditsinteger or null
    Their own daily credit limit. null means the bot's default.
  • first_seen_atstring or null
    ISO 8601 time of their first message.
  • last_seen_atstring or null
    ISO 8601 time of their latest message.
  • projectsinteger
    Projects they have. Omitted for somebody who has not used the bot.
  • messages_todayinteger
    Since midnight UTC. Omitted for somebody who has not used the bot.
  • messages_30dinteger
    Last 30 days. Omitted for somebody who has not used the bot.
  • credits_todayinteger
    Credits spent since midnight UTC. Omitted for somebody who has not used the bot.
  • credits_30dinteger
    Credits 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):

StatusCodeWhen
404not_foundThe key is not minted for an app you own (a personal key, for example). Use a key from the app whose bot you manage.
400invalid_requestuser is neither a numeric id nor a valid username.