removeUserVerification
Returns: TrueOfficial docs ↗
Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.
Parameters
user_idIntegerRequiredUnique identifier of the target user
Returns
On success, True is returned.
GramIO Usage
ts
// Remove verification from a user by their numeric ID
await bot.api.removeUserVerification({ user_id: 123456789 });ts
// Remove verification when a user triggers a command
bot.command("unverify", async (ctx) => {
if (!ctx.from) return;
await bot.api.removeUserVerification({ user_id: ctx.from.id });
await ctx.reply("Your verification has been removed.");
});ts
// Remove verification for a specific user passed as a command argument
bot.command("unverifyuser", async (ctx) => {
const userId = Number(ctx.args);
if (!userId || isNaN(userId)) return ctx.reply("Usage: /unverifyuser <user_id>");
await bot.api.removeUserVerification({ user_id: userId });
await ctx.reply(`Verification removed from user ${userId}.`);
});Errors
| Code | Error | Cause |
|---|---|---|
| 400 | Bad Request: user not found | user_id does not exist or the bot has never interacted with this user |
| 400 | Bad Request: USER_NOT_VERIFIED | The target user is not currently verified by this organization — check before calling |
| 403 | Forbidden: not enough rights | The bot's organization does not have third-party verification rights granted by Telegram |
| 429 | Too Many Requests: retry after N | Rate limit hit — check retry_after and use the auto-retry plugin |
Tips & Gotchas
- Only for approved verification organizations. This method is part of Telegram's third-party verification system. The bot must belong to an organization that Telegram has explicitly granted the ability to verify users. Regular bots cannot use this.
- Track verified users yourself. There is no API method to query which users your organization has verified. Maintain a list in your database to avoid calling
removeUserVerificationon users who aren't verified. user_idmust be numeric. Unlikechat_id, user IDs cannot be specified as@usernamestrings — always use the numeric integer ID.- Re-verification is possible. After removing verification, you can call
verifyUseragain at any time to re-grant the checkmark.
See Also
verifyUser— verify a user on behalf of your organizationverifyChat— verify a chat on behalf of your organizationremoveChatVerification— remove verification from a chat