Hi, can you help me, how can I connect WhatsApp as...
# support
f
Hi, can you help me, how can I connect WhatsApp as a destination channel?
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Ruben, I have a few questions on this - Where do you want to send the messages from (What source) - GDPR related issues and consent from customers to send data to Whatsapp Once you are clear on these, you can do the following - Setup the source in RudderStack - Setup a webhook destination - Now provide the FB end-point you want to send the data as the webhook url. Here are the FB docs - Create a user transformation to convert the data in the format required by Whatsapp from the docs above. (You could initially keep it simple and send only the mandatory fields to FB and later on you can add more fields) This should be doable since you would have to send messages to only one end-point and the method (POST), FROM_PHONE_NUMBER, Bearer token and Content type will remain same for all message
Copy code
curl -X  POST \ 'https://graph.facebook.com/`v18.0`⁣/FROM_PHONE_NUMBER_ID/messages' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '
    {
      "messaging_product": "whatsapp",
      "recipient_type": "individual",
      "to": "PHONE_NUMBER",
      "type": "text",
      "text": { // the text object
        "preview_url": false,
        "body": "MESSAGE_CONTENT"
        }
    }'