Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Preparing Ring content
Preparing Ring content
Preparing Ring content
Use Founder / Developer tabs in the docs sidebar. This is the admin bot for operators — not member Login via Telegram (OIDC) or Mini App initData auth. Member auth: Authentication. Stars membership: SubscriptionConductor.
Ring ships a Telegram Admin Bot so platform admins can moderate news, run selected admin operations, and receive approval callbacks without opening the web admin UI — while still obeying the same RBAC SSOT as /admin.
| Concern | Truth |
|---|---|
| Webhook | POST /api/telegram/admin-bot/webhook |
| Code | lib/telegram/admin-bot/ |
| RBAC | features/auth/user-role.ts — isPlatformAdmin / isSuperadmin |
| News approval | Bot callbacks + News / News Kingdom |
| Surface | Audience | Secret / crypto |
|---|---|---|
| Login via Telegram | Members (browser) | AUTH_TELEGRAM_ID / SECRET — OIDC at oauth.telegram.org |
| Mini App initData | Members (WebApp client) | WebAppData HMAC — TELEGRAM_MINI_APP_BOT_TOKEN (fallbacks documented on Authentication) |
| Link Telegram (profile) | Logged-in members | Login Widget HMAC with ADMIN_BOT_TOKEN / TELEGRAM_LOGIN_BOT_TOKEN |
| telegram_stars membership | Paying members | Same Mini App bot token + Bot API createInvoiceLink — SubscriptionConductor |
| Admin bot (this page) | Platform admins |
Missile-hour ops and travel-friendly moderation: approve newsroom drafts, check critical queues, and keep an audit trail — without VPN into a desktop admin session.
Telegram management sits with authentication, security, and verification:
admin / superadmin users can talk to the bot.communication.telegramId is set) before the whitelist can see them.Prerequisite: member Login via Telegram OIDC + Mini App initData vs this admin bot.
See-also: telegram_stars invoices share the Mini App bot token helper — not this admin webhook.
Same-workflow: scoring, promotion, and Telegram approve callbacks.
Next-step: draft → image → Telegram approve pipeline.
Use Founder / Developer tabs in the docs sidebar. This is the admin bot for operators — not member Login via Telegram (OIDC) or Mini App initData auth. Member auth: Authentication. Stars membership: SubscriptionConductor.
Ring ships a Telegram Admin Bot so platform admins can moderate news, run selected admin operations, and receive approval callbacks without opening the web admin UI — while still obeying the same RBAC SSOT as /admin.
| Concern | Truth |
|---|---|
| Webhook | POST /api/telegram/admin-bot/webhook |
| Code | lib/telegram/admin-bot/ |
| RBAC | features/auth/user-role.ts — isPlatformAdmin / isSuperadmin |
| News approval | Bot callbacks + News / News Kingdom |
| Surface | Audience | Secret / crypto |
|---|---|---|
| Login via Telegram | Members (browser) | AUTH_TELEGRAM_ID / SECRET — OIDC at oauth.telegram.org |
| Mini App initData | Members (WebApp client) | WebAppData HMAC — TELEGRAM_MINI_APP_BOT_TOKEN (fallbacks documented on Authentication) |
| Link Telegram (profile) | Logged-in members | Login Widget HMAC with ADMIN_BOT_TOKEN / TELEGRAM_LOGIN_BOT_TOKEN |
| telegram_stars membership | Paying members | Same Mini App bot token + Bot API createInvoiceLink — SubscriptionConductor |
| Admin bot (this page) | Platform admins |
Missile-hour ops and travel-friendly moderation: approve newsroom drafts, check critical queues, and keep an audit trail — without VPN into a desktop admin session.
Telegram management sits with authentication, security, and verification:
admin / superadmin users can talk to the bot.communication.telegramId is set) before the whitelist can see them.Prerequisite: member Login via Telegram OIDC + Mini App initData vs this admin bot.
See-also: telegram_stars invoices share the Mini App bot token helper — not this admin webhook.
Same-workflow: scoring, promotion, and Telegram approve callbacks.
Next-step: draft → image → Telegram approve pipeline.
Use Founder / Developer tabs in the docs sidebar. This is the admin bot for operators — not member Login via Telegram (OIDC) or Mini App initData auth. Member auth: Authentication. Stars membership: SubscriptionConductor.
Ring ships a Telegram Admin Bot so platform admins can moderate news, run selected admin operations, and receive approval callbacks without opening the web admin UI — while still obeying the same RBAC SSOT as /admin.
| Concern | Truth |
|---|---|
| Webhook | POST /api/telegram/admin-bot/webhook |
| Code | lib/telegram/admin-bot/ |
| RBAC | features/auth/user-role.ts — isPlatformAdmin / isSuperadmin |
| News approval | Bot callbacks + News / News Kingdom |
| Surface | Audience | Secret / crypto |
|---|---|---|
| Login via Telegram | Members (browser) | AUTH_TELEGRAM_ID / SECRET — OIDC at oauth.telegram.org |
| Mini App initData | Members (WebApp client) | WebAppData HMAC — TELEGRAM_MINI_APP_BOT_TOKEN (fallbacks documented on Authentication) |
| Link Telegram (profile) | Logged-in members | Login Widget HMAC with ADMIN_BOT_TOKEN / TELEGRAM_LOGIN_BOT_TOKEN |
| telegram_stars membership | Paying members | Same Mini App bot token + Bot API createInvoiceLink — SubscriptionConductor |
| Admin bot (this page) | Platform admins |
Missile-hour ops and travel-friendly moderation: approve newsroom drafts, check critical queues, and keep an audit trail — without VPN into a desktop admin session.
Telegram management sits with authentication, security, and verification:
admin / superadmin users can talk to the bot.communication.telegramId is set) before the whitelist can see them.Prerequisite: member Login via Telegram OIDC + Mini App initData vs this admin bot.
See-also: telegram_stars invoices share the Mini App bot token helper — not this admin webhook.
Same-workflow: scoring, promotion, and Telegram approve callbacks.
Next-step: draft → image → Telegram approve pipeline.
ADMIN_BOT_TOKEN + ADMIN_BOT_WEBHOOK_SECRET + whitelist |
Member Login via Telegram OIDC + roles the bot must respect.
lib/telegram/admin-bot/TELEGRAM_BOT_RBAC.md | RBAC policy SSOT (in-repo) |
Webhook URL shape: https://<your-domain>/api/telegram/admin-bot/webhook (HTTPS in production). Validate secret_token via validateWebhookSecret.
Member Login OIDC uses different env: AUTH_TELEGRAM_ID / AUTH_TELEGRAM_SECRET — see Authentication.
PLATFORM_ADMIN_ROLES.ring-api-executor.ts.Strict superadmin examples: user delete, platform branding / AI settings mutations. Platform admins: news moderation, selected order/wallet/verification paths — see TELEGRAM_BOT_RBAC.md.
| Path | Role |
|---|---|
features/auth/components/telegram-signin-button.tsx | Login via Telegram OIDC |
lib/auth/telegram-oidc.ts | Auth.js OIDC provider |
lib/auth/telegram-miniapp-initdata.ts | Mini App WebAppData HMAC + bot token helper |
features/auth/components/telegram-linking-modal.tsx | Legacy Login Widget linking |
app/api/auth/telegram/callback/route.ts | Widget callback (session required) |
lib/auth/telegram-login-widget-hash.ts | Shared widget HMAC |
lib/payments/subscription/providers/telegram-stars-subscription.ts | Stars XTR invoices |
See-also: IDE MCP twin for the same clone’s admin operations.
ADMIN_BOT_TOKEN + ADMIN_BOT_WEBHOOK_SECRET + whitelist |
Member Login via Telegram OIDC + roles the bot must respect.
lib/telegram/admin-bot/TELEGRAM_BOT_RBAC.md | RBAC policy SSOT (in-repo) |
Webhook URL shape: https://<your-domain>/api/telegram/admin-bot/webhook (HTTPS in production). Validate secret_token via validateWebhookSecret.
Member Login OIDC uses different env: AUTH_TELEGRAM_ID / AUTH_TELEGRAM_SECRET — see Authentication.
PLATFORM_ADMIN_ROLES.ring-api-executor.ts.Strict superadmin examples: user delete, platform branding / AI settings mutations. Platform admins: news moderation, selected order/wallet/verification paths — see TELEGRAM_BOT_RBAC.md.
| Path | Role |
|---|---|
features/auth/components/telegram-signin-button.tsx | Login via Telegram OIDC |
lib/auth/telegram-oidc.ts | Auth.js OIDC provider |
lib/auth/telegram-miniapp-initdata.ts | Mini App WebAppData HMAC + bot token helper |
features/auth/components/telegram-linking-modal.tsx | Legacy Login Widget linking |
app/api/auth/telegram/callback/route.ts | Widget callback (session required) |
lib/auth/telegram-login-widget-hash.ts | Shared widget HMAC |
lib/payments/subscription/providers/telegram-stars-subscription.ts | Stars XTR invoices |
See-also: IDE MCP twin for the same clone’s admin operations.
ADMIN_BOT_TOKEN + ADMIN_BOT_WEBHOOK_SECRET + whitelist |
Member Login via Telegram OIDC + roles the bot must respect.
lib/telegram/admin-bot/TELEGRAM_BOT_RBAC.md | RBAC policy SSOT (in-repo) |
Webhook URL shape: https://<your-domain>/api/telegram/admin-bot/webhook (HTTPS in production). Validate secret_token via validateWebhookSecret.
Member Login OIDC uses different env: AUTH_TELEGRAM_ID / AUTH_TELEGRAM_SECRET — see Authentication.
PLATFORM_ADMIN_ROLES.ring-api-executor.ts.Strict superadmin examples: user delete, platform branding / AI settings mutations. Platform admins: news moderation, selected order/wallet/verification paths — see TELEGRAM_BOT_RBAC.md.
| Path | Role |
|---|---|
features/auth/components/telegram-signin-button.tsx | Login via Telegram OIDC |
lib/auth/telegram-oidc.ts | Auth.js OIDC provider |
lib/auth/telegram-miniapp-initdata.ts | Mini App WebAppData HMAC + bot token helper |
features/auth/components/telegram-linking-modal.tsx | Legacy Login Widget linking |
app/api/auth/telegram/callback/route.ts | Widget callback (session required) |
lib/auth/telegram-login-widget-hash.ts | Shared widget HMAC |
lib/payments/subscription/providers/telegram-stars-subscription.ts | Stars XTR invoices |
See-also: IDE MCP twin for the same clone’s admin operations.
ADMIN_BOT_TOKEN=...
ADMIN_BOT_WEBHOOK_SECRET=...
ADMIN_BOT_TOKEN=...
ADMIN_BOT_WEBHOOK_SECRET=...
ADMIN_BOT_TOKEN=...
ADMIN_BOT_WEBHOOK_SECRET=...