Skip to content
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

Telegram test env support #48

Open
bulkashmak opened this issue Jan 6, 2025 · 1 comment
Open

Telegram test env support #48

bulkashmak opened this issue Jan 6, 2025 · 1 comment

Comments

@bulkashmak
Copy link

Telegram has a test environment, which is different from production env. In the official docs the url for test env looks this way: https://api.telegram.org/bot<token>/test/METHOD_NAME. I didn't find a solution in vue-tg docs on the way to switch between telegram's test and prod envs

@deptyped
Copy link
Owner

deptyped commented Jan 7, 2025

This library is designed for writing Mini Apps using Vue. It doesn't call Bot API methods, it only uses the client SDK provided by Telegram: https://core.telegram.org/bots/webapps#initializing-mini-apps

Looks like you are looking for a library to work with Bot API? I can recommend grammY.
It also supports test environment:

const bot = new Bot("TOKEN", {
  client: {
    environment: 'test'
  }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants