Summary
After receiving a WhatsApp message on an instance, attempting to send a message to the same contact fails with error 463 (NackCallerReachoutTimelocked) until the contact sends another message.
This appears to be caused by tctoken/cstoken not being persisted to whatsmeow_privacy_tokens after processing incoming messages that include those tokens.
Steps to Reproduce
- Start a fresh instance (no prior conversation with target)
- Send a message from the WhatsApp app to the instance number
- Immediately try to send a message from the instance to the sender's number via API
- Receive error 463
Expected Behavior
After receiving a message from a contact, the tctoken extracted from the incoming message should be stored in whatsmeow_privacy_tokens so subsequent outgoing messages to that contact succeed without requiring cstoken.
Root Cause (Hypothesis)
Based on analysis of the whatsmeow library:
Workaround
Use an instance that has previously exchanged messages with the contact (tokens already cached), or wait for the contact to send a new message before attempting outbound.
Environment
- evolution-go (latest)
- WhatsApp account migrated to LID identifiers
- Cold contact (no prior conversation history)
Additional Context
The whatsmeow_privacy_tokens table exists in the goevo-postgres database but remains empty for contacts that only sent inbound messages. The table is populated correctly when a successful outbound message is sent first (e.g., via a different instance that had prior history).
This issue blocks the use case of: user contacts a number → bot responds → fails with 463 on first reply.
Summary
After receiving a WhatsApp message on an instance, attempting to send a message to the same contact fails with error 463 (NackCallerReachoutTimelocked) until the contact sends another message.
This appears to be caused by
tctoken/cstokennot being persisted towhatsmeow_privacy_tokensafter processing incoming messages that include those tokens.Steps to Reproduce
Expected Behavior
After receiving a message from a contact, the
tctokenextracted from the incoming message should be stored inwhatsmeow_privacy_tokensso subsequent outgoing messages to that contact succeed without requiringcstoken.Root Cause (Hypothesis)
Based on analysis of the whatsmeow library:
tctoken/cstokenin theMessageContextInfoor via the LID/JID swap mechanismPHONENUMBER_LIDtable) but may not persist the resulting privacy tokensWorkaround
Use an instance that has previously exchanged messages with the contact (tokens already cached), or wait for the contact to send a new message before attempting outbound.
Environment
Additional Context
The
whatsmeow_privacy_tokenstable exists in the goevo-postgres database but remains empty for contacts that only sent inbound messages. The table is populated correctly when a successful outbound message is sent first (e.g., via a different instance that had prior history).This issue blocks the use case of: user contacts a number → bot responds → fails with 463 on first reply.