Send Video
Send videos to your contacts.
Usage
The Message facade's sendVideo method may be used to send a video to a contact or group.
php
use NjoguAmos\Waha\Facades\Message;
use NjoguAmos\Waha\Dto\MessageVideoData;
$data = new MessageVideoData(
chatId: '[email protected]',
file: ['url' => 'https://example.com/video.mp4'],
caption: 'Watch this!',
);
/** @var \Saloon\Http\Response $response */
$response = Message::sendVideo(data: $data);php
use NjoguAmos\Waha\Facades\Message;
use NjoguAmos\Waha\Dto\MessageVideoData;
$data = new MessageVideoData(
chatId: '[email protected]',
file: ['url' => 'https://example.com/video.mp4'],
reply_to: '[email protected]_AAA',
);
/** @var \Saloon\Http\Response $response */
$response = Message::sendVideo(data: $data);Response
The response returned by the sendVideo method is an instance of Saloon\Http\Response. You may use the json method to retrieve the response as an array:
php
/** @var \Saloon\Http\Response $response */
$response->status(); // 201
$response->json(); // ["id" => "[email protected]_BAE6A33293978B16", "timestamp" => 1629200000, ...]Engines
| WEBJS | WPP | NOWEB | GOWS |
|---|---|---|---|
| ➕ | ➕ | ➕ | ➕ |