PaulSonOfLars/gotgbot

unable to create new updater: invalid getMe request

Closed this issue · 3 comments

Hi! I got API key for TG bot, download your bot sample, put my API key. I got this error
unable to create new updater: invalid getMe request
How to resolve it?

Looks like you're not using the right API key, or using it wrong.

So. If I put key to

token := os.Getenv("TOKEN")

bot is not working. If I put key to
updater, err := gotgbot.NewUpdater(token)

as string, bot is working.
And thank you for helping, I really didn't put one part of key.
I use Manjaro Cinnamon.

As a sidenote: os.Getenv was looking at the environment variable named TOKEN. If i understand right, you replaced "TOKEN" with your token; which would not have worked.