Whatsapp (business) cloud API expires your chat session after 24 hours of inactivity. I developed a mini-app to use the API to send server alarms about the state of my machines, but when the (user-initiated) session is aging more than 24 hours the cloud API disables my notifications, it just silently drops all the messages (that I am sending via API) without any error code. Of course an alarm system can't be so unreliable so I need to keep the session with business test account (which sends all the messages) active before the API expires it.

How can I do it? I can't send messages on behalf of myself using the API, so how can you make the conversation active all the time programmatically so it never becomes inactive?

Or if there are any other methods to send Whatsapp messages programmatically all the time without manually initiating conversation with business account I would like to hear your suggestions.

Tag:whatsapp, whatsapi

Only one comment.

  1. Sergio Galarza

    Use utility templates, templates are the only way for the cloud api account to start conversations.

    https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates/

Add a new comment.