Describe the bug
Pairing code is generated successfully but WhatsApp immediately responds with Error 429
"rate-overlimit" before the user can even enter the code in their phone. The pairing code appears
on screen, but the connection is terminated within 1 second with a rate limit error.
To Reproduce
Steps to reproduce the behavior:
- Request pairing code using requestPairingCode(phoneNumber) with E.164 formatted phone number
(e.g., "5491111111111")
- Pairing code is generated and returned successfully (e.g., "TA65-DJMT")
- creds.update event fires with registered: true and pairingCode set
- Immediately after (~300ms), receive unhandled frame:
{"tag":"iq","attrs":{"from":"@s.whatsapp.net","type":"error","id":"50098.62089-1"},"content":[{"tag":"error","attrs":{"code":"429","text":"rate-overlimit"}}]}
- Connection fails before user can input the pairing code in WhatsApp app
Expected behavior
After pairing code is generated, the connection should remain open waiting for the user to:
- Open WhatsApp on their phone
- Go to "Linked Devices"
- Select "Link with phone number"
- Enter the pairing code shown on screen
- Complete the authentication successfully
Environment (please complete the following information):
- Baileys version: 6.7.20 (@whiskeysockets/baileys)
- Server: Yes, Node.js production server
- Multiple clients on same IP: Yes, multi-tenant architecture with ~200+ concurrent WhatsApp
connections per server
- Proxy: No
connectOptions:
{
version: [2, 3000, 1027934701],
browser: ["Windows", "Chrome", "114.0.5735.198"], // From issue #1382
printQRInTerminal: false,
auth: mongoAuthState,
defaultQueryTimeoutMs: undefined, // From issue #390
keepAliveIntervalMs: 30e3,
qrTimeout: undefined,
markOnlineOnConnect: false,
syncFullHistory: false,
getMessage: async (key) => { /* ... */ }
}
Additional context
Changes applied based on existing issues:
What works:
- Phone number validation and E.164 formatting
- Pairing code generation (requestPairingCode() returns successfully)
- Code is displayed to user
- creds.update event with pairingCode and registered: true
What fails:
- WhatsApp server responds with Error 429 "rate-overlimit" immediately after code generation
- Connection closes before user can input code
- Subsequent retry attempts also fail with 429 (rate limit persists for ~15-40 minutes)
Logs:
{"level":30,"msg":"[user] Requesting pairing code for 5491111111111"}
{"level":20,"msg":"[user] Event emitted: creds.update"}
{"level":30,"msg":"[user] creds.update received, keys: noiseKey, pairingEphemeralKeyPair,
signedIdentityKey, signedPreKey, registrationId, advSecretKey, processedHistoryMessages,
nextPreKeyId, firstUnuploadedPreKeyId, accountSyncCounter, accountSettings, registered,
pairingCode, lastPropHash, routingInfo, me"}
{"level":30,"msg":"[user] Pairing code obtained: TA65-DJMT"}
{"level":30,"msg":"Successful pairing detected"}
{"level":20,"unhandled":true,"msgId":"50098.62089-1","fromMe":false,"frame":{"tag":"iq","attrs": {"from":"@s.whatsapp.net","type":"error","id":"50098.62089-1"},"content":[{"tag":"error","attrs":{"code":"429","text":"rate-overlimit"}}]},"msg":"communication recv"}
Describe the bug
Pairing code is generated successfully but WhatsApp immediately responds with Error 429
"rate-overlimit" before the user can even enter the code in their phone. The pairing code appears
on screen, but the connection is terminated within 1 second with a rate limit error.
To Reproduce
Steps to reproduce the behavior:
(e.g., "5491111111111")
{"tag":"iq","attrs":{"from":"@s.whatsapp.net","type":"error","id":"50098.62089-1"},"content":[{"tag":"error","attrs":{"code":"429","text":"rate-overlimit"}}]}
Expected behavior
After pairing code is generated, the connection should remain open waiting for the user to:
Environment (please complete the following information):
connections per server
connectOptions:
{
version: [2, 3000, 1027934701],
browser: ["Windows", "Chrome", "114.0.5735.198"], // From issue #1382
printQRInTerminal: false,
auth: mongoAuthState,
defaultQueryTimeoutMs: undefined, // From issue #390
keepAliveIntervalMs: 30e3,
qrTimeout: undefined,
markOnlineOnConnect: false,
syncFullHistory: false,
getMessage: async (key) => { /* ... */ }
}
Additional context
Changes applied based on existing issues:
documentation
What works:
What fails:
Logs:
{"level":30,"msg":"[user] Requesting pairing code for 5491111111111"}
{"level":20,"msg":"[user] Event emitted: creds.update"}
{"level":30,"msg":"[user] creds.update received, keys: noiseKey, pairingEphemeralKeyPair,
signedIdentityKey, signedPreKey, registrationId, advSecretKey, processedHistoryMessages,
nextPreKeyId, firstUnuploadedPreKeyId, accountSyncCounter, accountSettings, registered,
pairingCode, lastPropHash, routingInfo, me"}
{"level":30,"msg":"[user] Pairing code obtained: TA65-DJMT"}
{"level":30,"msg":"Successful pairing detected"}
{"level":20,"unhandled":true,"msgId":"50098.62089-1","fromMe":false,"frame":{"tag":"iq","attrs": {"from":"@s.whatsapp.net","type":"error","id":"50098.62089-1"},"content":[{"tag":"error","attrs":{"code":"429","text":"rate-overlimit"}}]},"msg":"communication recv"}