Video

The structure presented is as follows:

function Video(number, linkVideo){
    const data = JSON.stringify({
        "messaging_product": "whatsapp",    
        "recipient_type": "individual",
        "to": number,
        "type": "video",
        "video": {
            //(URL FOR VIDEO .MP4)
            "link": linkVideo
        }
    });
    return data;
}

In this one you receive as parameters a number and one link of the video that you want to send.

We recommend sending in the following way in the process files:

let answer = dictionaryModule.function();
let model = models.Video(answer,number);

If not also in the whatsappModels file:

const linkVideo = "https://yourUrlExample.supabase.co/storage/v1/object/public/files-video/video.mp4";
const info = whatsappModels.Video(number, linkVideo);

Última actualización