Telegram username → ID
HTTP API that turns a Telegram username into its numeric id. Users, bots, channels, groups.
Get a key in the botapi.idbot.devHow it works
- Open @idbot_api_bot, top up your balance and pick a plan. The key is issued instantly.
- Send it in the
Authorization: Bearer <key>header. - Call
/v1/resolve?username=…and get JSON back.
Example
curl -H "Authorization: Bearer $API_KEY" \
'https://api.idbot.dev/v1/resolve?username=durov'
{
"ok": true,
"id": "1006503122",
"type": "Channel",
"username": "durov",
"title": "Pavel Durov",
"onlineCount": null
}
For channels and supergroups id has no Bot API prefix: in the Bot API it is -100 + id.
Endpoints
GET /v1/resolve?username=… | username → id, type, name / title. The leading @ is optional. |
GET /v1/me | Plan, daily limit, remaining today, monthly usage, paid-until date. |
GET /ping | Health check. No key needed. |
Quota
- The limit is requests per day, reset at 00:00 UTC.
- Not counted: invalid usernames, service errors (503).
- Counted: found entities,
NO_USER,PRIVATE_CHANNEL. - When exhausted:
429 QUOTA_EXCEEDEDwith aRetry-Afterheader. - Rate: up to 5 requests per second per key, beyond that
429 RATE_LIMITED.
Plans
Mini
30
per day
4 USDT · 320 ⭐
per 30 days
Start
100
per day
10 USDT · 800 ⭐
per 30 days
Mid
500
per day
25 USDT · 2000 ⭐
per 30 days
Scale
1000
per day
49 USDT · 3920 ⭐
per 30 days
Prepaid for 30 days. Pay with USDT TRC-20 or Telegram Stars. Auto-renewal from balance; upgrades apply instantly with unused days refunded.
Errors
{"ok": false, "error": "…"}
| HTTP | error | |
|---|---|---|
| 401 | UNAUTHORIZED | missing or invalid key |
| 403 | KEY_DISABLED | key disabled (plan not paid) |
| 400 | INVALID_USERNAME | malformed username |
| 429 | QUOTA_EXCEEDED | daily limit reached |
| 429 | RATE_LIMITED | more than 5 requests per second |
| 503 | UPSTREAM_UNAVAILABLE | temporarily unavailable, retry later |
| 200 | NO_USER | no such username |
| 200 | PRIVATE_CHANNEL | the channel exists but is private |