-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I always get 401 unauthorized error when use test bot #1198
Comments
@judy9712 // @ts-ignore
new TelegramBot(TOKEN || '', {polling: true, testEnvironment: true}); But it is still an issue with |
Same issue. Just created account in test environment, created 2 bots with bot father bot and neither of them works. Both returning 401 Unauthorized on getMy endpoint. Tried to revoke tokens and use new ones - no luck so far. Any thoughts? |
@vsolovev have you tried the workaround from my comment above?
|
@rock1nbvv |
@timurrakhimzhan So technically you are correct i just made ts to allow tweaking my configuration. And as I remember it worked well(though i had other issues with test env) as lib itself already has this setting. 401 error happens when you try to login to live env with your test env credentials what can be changed by editing configuration. Yet i did quite a while ago so correct me if i am wrong. |
I have read:
I am using the latest version of the library.
I'm trying to connect my bot created in a test environment. However, even though I input the correct bot token, I keep getting a 401 unauthorized error.
this is my code:
and this is my package.json
I saw the testEnvironment option in api docs.
However, when I try to input 'testEnvironment' in the options, it says that it's not a valid option. Has the 'testEnvironment' option been removed? How can I develop using a bot deployed in a test environment?
The text was updated successfully, but these errors were encountered: