API - SISTEMA | BAILEYS | OFIC...
Enviar Vídeo 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/sendURLVideo',
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 "body": "https://whaticket-saas.com/whaticket.mp4",
17 "caption": "Teste de Caption"
18 }',
19 CURLOPT_HTTPHEADER => array(
20 'Content-Type: application/json',
21 'Authorization: Bearer seu token aqui'
22 ),
23));
24
25$response = curl_exec($curl);
26
27curl_close($curl);
28echo $response;
29
30
Updated 19 May 2024

Did this page help you?