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

Bot Token Not Found #549

Open
Valince opened this issue Dec 21, 2023 · 1 comment
Open

Bot Token Not Found #549

Valince opened this issue Dec 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Valince
Copy link

Valince commented Dec 21, 2023

Followed all instructions, getting Bot token not found and then the app stops.

What am I missing here? Bot token has been added....

tgcf
Running latest tgcf version 1.1.8

[12/21/23 10:03:17] INFO Verbosity turned on! This is suitable for debugging cli.py:57
INFO cryptg detected, it will be used for encryption aes.py:19
[12/21/23 10:03:18] INFO tgcf.config.json detected! config.py:109
INFO config.py got executed config.py:259
INFO using bot account config.py:215
INFO Connecting to 149.154.167.51:443/TcpFull... mtprotosender.py:226
[12/21/23 10:03:20] INFO Connection to 149.154.167.51:443/TcpFull complete! mtprotosender.py:277
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/mint/my-tgcf/.venv/lib/python3.10/site-packages/tgcf/cli.py:120 in main │
│ │
│ 117 │ else: │
│ 118 │ │ from tgcf.live import start_sync # pylint: disable=import-outside-toplevel │
│ 119 │ │ │
│ ❱ 120 │ │ asyncio.run(start_sync()) │
│ 121 │
│ 122 │
│ 123 # AAHNIK 2021 │
│ │
│ /usr/lib/python3.10/asyncio/runners.py:44 in run │
│ │
│ 41 │ │ events.set_event_loop(loop) │
│ 42 │ │ if debug is not None: │
│ 43 │ │ │ loop.set_debug(debug) │
│ ❱ 44 │ │ return loop.run_until_complete(main) │
│ 45 │ finally: │
│ 46 │ │ try: │
│ 47 │ │ │ _cancel_all_tasks(loop) │
│ │
│ /usr/lib/python3.10/asyncio/base_events.py:649 in run_until_complete │
│ │
│ 646 │ │ if not future.done(): │
│ 647 │ │ │ raise RuntimeError('Event loop stopped before Future completed.') │
│ 648 │ │ │
│ ❱ 649 │ │ return future.result() │
│ 650 │ │
│ 651 │ def stop(self): │
│ 652 │ │ """Stop running the event loop. │
│ │
│ /home/mint/my-tgcf/.venv/lib/python3.10/site-packages/tgcf/live.py:133 in start_sync │
│ │
│ 130 │ │ if CONFIG.login.BOT_TOKEN == "": │
│ 131 │ │ │ logging.warning("Bot token not found, but login type is set to bot.") │
│ 132 │ │ │ sys.exit() │
│ ❱ 133 │ │ await client.start(bot_token=CONFIG.login.BOT_TOKEN) │
│ 134 │ else: │
│ 135 │ │ await client.start() │
│ 136 │ config.is_bot = await client.is_bot() │
│ │
│ /home/mint/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/auth.py:183 in _start │
│ │
│ 180 │ │ │ │ phone = utils.parse_phone(value) or phone │
│ 181 │ │ │
│ 182 │ │ if bot_token: │
│ ❱ 183 │ │ │ await self.sign_in(bot_token=bot_token) │
│ 184 │ │ │ return self │
│ 185 │ │ │
│ 186 │ │ me = None │
│ │
│ /home/mint/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/auth.py:369 in sign_in │
│ │
│ 366 │ │ │ │ 'and a password only if an RPCError was raised before.' │
│ 367 │ │ │ ) │
│ 368 │ │ │
│ ❱ 369 │ │ result = await self(request) │
│ 370 │ │ if isinstance(result, types.auth.AuthorizationSignUpRequired): │
│ 371 │ │ │ # Emulate pre-layer 104 behaviour │
│ 372 │ │ │ self._tos = result.terms_of_service │
│ │
│ /home/mint/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/users.py:30 in call
│ │
│ 27 │
│ 28 class UserMethods: │
│ 29 │ async def call(self: 'TelegramClient', request, ordered=False, flood_sleep_thres │
│ ❱ 30 │ │ return await self._call(self._sender, request, ordered=ordered) │
│ 31 │ │
│ 32 │ async def call(self: 'TelegramClient', sender, request, ordered=False, flood_sleep
│ 33 │ │ if flood_sleep_threshold is None: │
│ │
│ /home/mint/my-tgcf/.venv/lib/python3.10/site-packages/telethon/client/users.py:84 in _call │
│ │
│ 81 │ │ │ │ │ else: │
│ 82 │ │ │ │ │ │ return results │
│ 83 │ │ │ │ else: │
│ ❱ 84 │ │ │ │ │ result = await future │
│ 85 │ │ │ │ │ self.session.process_entities(result) │
│ 86 │ │ │ │ │ self._entity_cache.add(result) │
│ 87 │ │ │ │ │ return result │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ApiIdInvalidError: The api_id/api_hash combination is invalid (caused by ImportBotAuthorizationRequest)

@Valince Valince added the bug Something isn't working label Dec 21, 2023
@AasishSapkota
Copy link

AasishSapkota commented Feb 3, 2024

sometimes just refreshing it and entering the bot token and then click save 2-3 times will solve this problem . i was also facing the same problem.

let me if it helped you or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants