Describe the bug
I'm using the Baileys 7.0.0-rc.9 to connect a new WhatsApp account using the requestPairingCode method. The pairing code is successfully generated and logged in the terminal, but no notification or prompt appears on the target device or in WhatsApp > Linked Devices.
To Reproduce
Steps to reproduce the behavior:
code
const sock = makeWASocket({
auth: state,
printQRInTerminal: false,
logger: pinoLogger,
// Browser format must be 'Name (OS)' for pairing code to work
browser: Browsers.macOS("Chrome"),
shouldSyncHistoryMessage: () => false,
})
sock.ev.on('creds.update', saveCreds)
sock.ev.on('connection.update', async (update) => {
const { connection, lastDisconnect, qr } = update
// Request pairing code when QR is received (socket is ready for auth)
if (qr && method === 'pairing' && phone && !pairingCodeRequested) {
pairingCodeRequested = true
try {
// Phone must be E.164 format without plus sign
const phoneNumber = phone.replace(/[^0-9]/g, '')
logger.info('Requesting pairing code', { alias, phoneNumber })
const code = await sock.requestPairingCode(phoneNumber)
await topicManager.postToCmd(`Pairing code for "${alias}": ${code}\n\nEnter this code on your WhatsApp mobile app:\nSettings → Linked Devices → Link a Device → Link with phone number instead`)
logger.info('Pairing code sent', { alias, phone })
} catch (error) {
logger.error('Pairing code request failed', { alias, error: String(error) })
await topicManager.postToError(
formatErrorMessage(new Date(), alias, 'PAIRING_FAILED', { error: String(error) })
)
}
}
we already go this code printed in console. but no notifications was received on mobile.
Expected behavior
we got the the whatsapp notification to enter code on mobile
Environment (please complete the following information):
-
Is this on a server?
no
-
What do your connectOptions look like?
already pasted in code
-
Do you have multiple clients on the same IP?
no
-
Are you using a proxy?
no
Describe the bug
I'm using the Baileys 7.0.0-rc.9 to connect a new WhatsApp account using the requestPairingCode method. The pairing code is successfully generated and logged in the terminal, but no notification or prompt appears on the target device or in WhatsApp > Linked Devices.
To Reproduce
Steps to reproduce the behavior:
code
we already go this code printed in console. but no notifications was received on mobile.
Expected behavior
we got the the whatsapp notification to enter code on mobile
Environment (please complete the following information):
Is this on a server?
no
What do your
connectOptionslook like?already pasted in code
Do you have multiple clients on the same IP?
no
Are you using a proxy?
no