Before starting, prepare the following.
1. An Active WhatsApp Account
You need access to the WhatsApp account you want to link.
You should be able to open its settings and manage linked devices.
2. A Compatible MD Bot Project
Choose a bot project that explicitly documents pairing code authentication.
Some projects support only QR authentication or another method.
3. An Official Developer Linked Pairing Page
Use the pairing page linked from the project's original repository or official documentation.
Avoid random websites advertising free pairing services without identifying the developer or project.
4. Your Phone Number
Prepare the number associated with your WhatsApp account.
You may need to enter it with its international country code.
5. An Internet Connection
Both the pairing page and WhatsApp need an active internet connection for the process to work.
Step by Step: How to Get a WhatsApp Bot Pairing Code
The following is a general guide for projects that provide a pairing website.
Step 1: Open the Developer's Pairing Website
Find the pairing page through the original bot repository or its documented website.
Check that the page belongs to the project you intend to use.
Do not enter your phone number on an unrelated website simply because it promises a free Session ID.
Step 2: Enter Your Phone Number
The pairing page may ask for the phone number you want to link.
Enter the number in the format requested by the developer.
Usually, international country code formatting is required.
For example, an illustrative format for a number from Pakistan would begin with the country code 92, followed by the remaining number without the domestic leading zero.
Always follow the pairing page's actual instructions.
Step 3: Request the Pairing Code
After entering your number, select the available request or generate code option.
The page may take a few moments to communicate with the authentication service.
If successful, it should display a temporary pairing code.
The exact appearance and length depend on the authentication implementation.
Step 4: Open WhatsApp on Your Phone
Once the code appears, open the WhatsApp account you want to link.
Do not send the code to anyone or enter it into an ordinary WhatsApp conversation.
Step 5: Open Linked Devices
On Android:
1.Open WhatsApp.
2.Select the three dot menu.
3.Choose Linked Devices.
4.Select Link a Device if needed.
5.Find the option to link using a phone number.
On iPhone:
1.Open WhatsApp.
2.Go to Settings.
3.Select Linked Devices.
4.Choose Link a Device.
5.Find the option to link using a phone number.
The exact wording and screen layout may vary with the WhatsApp version.
Step 6: Enter the Pairing Code
Enter the code displayed on the developer's pairing page into the appropriate WhatsApp field.
Make sure the code is entered correctly.
Pairing codes are temporary, so do not wait unnecessarily after requesting one.
Step 7: Wait for Linking to Complete
WhatsApp will process the linking request.
If the process succeeds, the linked device should appear in the Linked Devices section.
The pairing website or bot application may then provide further authentication information.
Step 8: Complete the Bot Setup
Depending on the project, you may need to copy the generated Session ID into the hosting panel or configuration file.
After that:
1.Configure the required environment variables.
2.Install the bot dependencies.
3.Start the application.
4.Check the connection logs.
5.Test a documented command.
Pairing connects the account. Deployment runs the application.
These are two separate parts of the setup process.