A self-hosted telegram-bot-api server started returning 401 unauthorized on every request even though the same bot token worked against api.telegram.org, and reinstalling, changing tokens, and new app id/hash did not help. The reporter's own log review found a typo in the app_id. Separately, the maintainers confirmed a second 401 cause: after a successful logOut call, all requests to the local server return 401 for the first 10 minutes.