WhatsApp messages are getting rejected with Error 1340, "Outside of the allowed window—This message is sent outside of the allowed response window."
- Messages API
Ensure that you are using a templated message.
This error occurs if a free-form or non-templated WhatsApp message is sent outside the Customer Care Window (24 hours after an end-user sends a message to the customer). WhatsApp requires that any message that is sent to a user for the first time, or that is outside the Customer Care Window be a templated message, therefore, freeform or non-templated messages will be rejected with error code 1340 (WhatsApp error code:470).
For more information, see Facebook's WhatsApp Messages Guidelines.