API - WHATSMEOW PRO
Arquivo por URL
1min
PHP
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6 CURLOPT_URL => 'https://{BACKEND_URL}/api/messages/whatsmeow/sendUrlFilesWhatsmeowPRO',
7 CURLOPT_RETURNTRANSFER => true,
8 CURLOPT_ENCODING => '',
9 CURLOPT_MAXREDIRS => 10,
10 CURLOPT_TIMEOUT => 0,
11 CURLOPT_FOLLOWLOCATION => true,
12 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13 CURLOPT_CUSTOMREQUEST => 'POST',
14 CURLOPT_POSTFIELDS =>'{
15 "number": "5511989091838",
16 "type": "image", //audio, video, document
17 "caption": "",
18 "fileName": "algumacoisa.jpeg",
19 "body": "https://img-s-msn-com.akamaized.net/tenant/amp/entityid/AA1CrTmb.img?w=612&h=304&q=90&m=6&f=webp&u=t"
20 }',
21 CURLOPT_HTTPHEADER => array(
22 'Content-Type: application/json',
23 'Authorization: Bearer seutokenaqui' //Token cadastrado na conexão
24 ),
25));
26
27$response = curl_exec($curl);
28
29curl_close($curl);
30echo $response;
31
Updated 07 Apr 2025

Did this page help you?