Telegram bot users

Update a bot user

Change one person: allowed (allowlist), blocked, daily_credits (null for the bot's default).

Live keys only, 120 changes a minute per app. A key only ever reaches its own app's bot. Blocking somebody stops work already queued for them and sends the telegram.end_user.blocked webhook.

patch/telegram/users/{user}

Request

  • Base URL: https://api.vidmoat.com/v1
  • URL: https://api.vidmoat.com/v1/telegram/users/{user}
  • Auth: HTTP bearer

Path parameters

userstring required

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

Request body

allowedboolean

true adds them to the allowlist (by id, or by the @username you gave when they have not used the bot yet); false removes them.

blockedboolean

true blocks them; false unblocks them.

daily_creditsinteger nullable

Their own daily limit, 0 to 1,000,000, or null for the bot's default.

Response

Update a bot user

objectstring

Always telegram_user.

idstring nullable

Vidmoat id of the person. null for somebody who has not used the bot yet.

telegram_user_idstring nullable

Numeric Telegram id, as a string.

usernamestring nullable

Telegram @username, without the @.

display_namestring nullable

Their Telegram name.

status'active' | 'blocked'

Whether they are blocked.

allowlistedboolean

On the bot's allowlist.

daily_creditsinteger nullable

Their own daily credit limit. null means the bot's default.

first_seen_atstring nullable

ISO 8601 time of their first message.

last_seen_atstring nullable

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.

Changes

No recorded changes to this operation across all 1 revision of this API.