Sometimes the pairing process does not work as expected.
Here are common problems and possible solutions.
1. The Base Bot Shows a QR Code Instead of a Pairing Code
This does not necessarily mean something is broken.
The project may only support QR authentication, or its configuration may be set to use QR mode.
Solution:
Read the README.
Check whether pairing code authentication is supported.
Review the project's authentication settings.
Follow the documented method.
Do not assume that every base bot can generate a pairing code.
2. Pairing Code Request Fails
Possible reasons include:
Incorrect phone number.
Authentication server unavailable.
Unsupported authentication method.
Network problems.
Application configuration errors.
Solution:
Check the number format, internet connection, terminal logs, and developer documentation.
3. Session Is Not Saved
A base bot may authenticate successfully but fail to save its session information.
Possible reasons include incorrect file permissions, missing storage directories, or configuration problems.
Solution:
Check the terminal error.
Verify that the application can write to its session directory.
Check the documented storage location.
Avoid deleting authentication files randomly.
4. Pairing Code Expires
Pairing codes are temporary credentials.
If you wait too long, the code may stop working.
Solution:
Request a fresh code and complete authentication promptly.
5. Bot Connects but Does Not Respond
This may happen because the base bot has not been fully configured.
Possible reasons include:
Missing command handler.
Incorrect prefix.
Incomplete plugin configuration.
Application errors.
Message handling problems.
Solution:
Check the application logs and verify that the basic message handling system is working.
Base Bot Pairing Code vs QR Code
Pairing code vs QR code:
Authentication / Enter a temporary code / Scan a QR image
Camera / Usually not required / Required
Setup / Generate and enter code / Display and scan code
Expiration / Temporary / Temporary
Remote setup / Convenient / Also possible with another screen
Availability / Depends on project / Depends on project
Neither method is universally better.
Choose the method supported by the base bot you are using.