[Python] How to send WhatsApp messages using Meta Cloud API without prior user opt-in?

Discussão em 'Python' iniciado por Stack, Junho 6, 2025.

  1. Stack

    Stack Membro Participativo

    I'm building a Python application to send automated WhatsApp reminders to users. I plan to use the WhatsApp Cloud API (Meta) or possibly Twilio.

    From the documentation, it appears that user opt-in is required before sending any messages. However, my use case involves sending reminders to users who have not explicitly opted in via WhatsApp (but they have provided their phone numbers during registration on our app/website).

    My questions are:

    Is it possible to send WhatsApp messages using the official API (Meta Cloud API or Twilio) without the user opting in via WhatsApp?

    If not, what are the recommended ways to collect opt-in or handle messaging flows that start outside WhatsApp?

    Are there any alternatives or compliant workarounds to reach users initially?

    I want to follow WhatsApp's terms of service and avoid any number bans or legal issues.

    Technologies I'm using:

    Python (requests, FastAPI)

    Considering Meta WhatsApp Cloud API or Twilio API

    Users have phone numbers stored in a PostgreSQL database

    Any guidance or best practices would be appreciated!

    Continue reading...

Compartilhe esta Página