Quick answers to the questions developers hit first. For parameter-level details, see core.mp.net/bots.
Overview
Common questions grouped by topic. If your issue is not here, check the relevant guide in this collection.
Getting started
Where do I start? Non-developers: try a bot in 10 minutes (Windows / iOS). Developers: the curl + Node.js quickstart.
What is an mpbot? A test/dev bot with its own token and API permissions, kept isolated from production.
Where do I store the token? Environment variables or secret management. Never in git, logs, or the frontend.
Messaging
Why can't the bot DM first? A user must establish context;
sendMessageneeds a validchat_id.How do I get a chat_id? User sends a message →
getUpdates→ readmessage.chat.id. In private chats it usually equals the user id.getUpdates returns []? No message yet, or the batch was consumed. Check
offsetand webhook state.getUpdates returns 409? A webhook is enabled (mutually exclusive). Confirm with
getWebhookInfo; do not rundeleteWebhookyourself.
Media and limits
Can I reuse a file_id? No. Use a public URL or multipart.
Does banChatMember kick? No — it mutes (restricted). Lift with
unbanChatMember. L3 DocOnly.Why are sendPoll / sendLocation unavailable? They currently return 501.
Got a 429? Stay at or below 30 req/s and add exponential backoff.
MiniApp
Can frontend data log a user in directly? No. The backend must verify the
initDatasignature;initDataUnsafeis UI only.
Safety
Which methods are unsafe to test? DocOnly:
logOut,leaveChat,deleteMessage(s),banChatMember,setWebhook,deleteWebhook.Where is the official reference? core.mp.net/bots — parameter-level source of truth.
Related
This FAQ summarizes behavior that may change. Always confirm current status on the official methods page.
