Frequently Asked Questions

Frequently Asked Questions

Why my account is banned after login?

The problem with the banned account is still ambiguous. In every MTProto framework, there will always be this problem and of course there is no definite reason.

Due to excessive abuse of the Telegram API, all accounts that sign up or log in using unofficial Telegram API clients are automatically put under observation to avoid violations of the Terms of Service. (obtaining_api_id)

To prevent this , try to take the following actions:

Maybe it’s not completely working, but what’s the harm in trying :)

  • Use an account on the official Telegram for at least one month of interaction (sending messages, joining groups, etc…).
  • Setting deviceModel, appVersion and systemVersion manually. This is intended when you create a local session and want to use it on any VPS or cloud host so that it is not declared as abuse.
  • The deviceModel platform is must be same with your platform app when creating on my.telegram.org.
  • Do not login and logout too often. Because it can cause a telegram marked your account as abuse.
tgsnake.config.js
const config = {
  // your config
  clientOptions: {
    deviceModel: 'Android',
  },
};
module.exports = config;

Can i install on Termux?

Yeah of course, different from v2 which requires installing python, in this v3 you can directly install without having to install python first.

npx create-tgsnake-app myapp

Can i use webhook?

Sadly no, MTProto use a long polling for handle and receive update from telegram. That different with bot api which is can use webhook for handle and receive update from telegram.

Can i use on browser?

Maybe nope for this time, we are not testing on browser. Maybe soon we will try to make a browser support. But don’t worry, some of our frameworks are supported on Deno!

What difference between @tgsnake/core and tgsnake?

@tgsnake/core role as a connection bridge between the client (us) and the Telegram server. So everything is still raw and unprocessed. tgsnake using @tgsnake/core as a base and processing it to look like a fire bot.

I didn’t get any messages from the big channels after 2 minutes or more.

If you join a channel that is busy in the sense of frequently sending messages, try following the solution from this issue. If the solution to this issue doesn’t work, please leave a comment with a log and we will reopen the issue.

Does it have an auto reconnect feature if the connection is interrupted?

Yes, we have auto reconnect when connection interrupted. Client will make 3 reconnection attempts to the Telegram server, then the application will stop with an error in the terminal. You can change maxReconnectRetries in client options to set how many attempt for reconnecting.