Telegram · 409
Telegram 409 Conflict
Telegram only lets one connection at a time fetch a bot's updates. Something else is fetching them too, and the two keep knocking each other off.
What you are seeing
Bot API
Conflict: terminated by other getUpdates request; make sure that only one bot instance is runningBot API
Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook firstAnother copy is running
This is the cause nine times in ten. The bot is still running on your own computer, in a second terminal, in an IDE's run window you forgot about, or on another host you tried first. Each copy asks Telegram for updates, each request cancels the other, and both log 409 in turn.
Stop every copy you know of, then start exactly one. If the error carries on with only one running, somebody else has your token — revoke it with /revoke in @BotFather and use the new one.
A single 409 in the seconds after a restart is harmless: the previous process's last request can take a moment to expire. It is only a problem if it keeps happening.
A webhook is still set
The second message means the bot was once set up with a webhook, and Telegram will not also hand out updates by polling. Delete the webhook, then start the bot. Most libraries do this for you when they start polling; if yours does not, a one-off request does it.
Browser or curl
https://api.telegram.org/bot<YOUR_TOKEN>/deleteWebhook
python-telegram-bot
# drop_pending_updates also skips anything queued while the bot was down. application.run_polling(drop_pending_updates=True)
FAQ
Questions
Can I run the bot locally for testing while it runs on a server?
Not with the same token. Create a second bot in @BotFather for development, so your test copy and your live copy never share one.
Does hosting cause this?
Only if two copies end up running. On our hosting a server runs one process, so the second copy is almost always somewhere else — usually your own machine.