Forward a stored message to another phone number.
Required: phone (recipient), messageId (the WhatsApp message id of a message stored in your inbox).
Channels: QR (WhatsApp Web) channels only. On official WhatsApp Cloud API channels this request is not supported.
Trường biểu mẫu
| Trường | Ví dụ |
|---|---|
phone | {{phone}} |
messageId | 3EB0C4F1A2B3D4E5F6 |
Ví dụ yêu cầu
curl -X POST "https://letsbot.net/api/v1/message/send/forward/message" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "messageId=3EB0C4F1A2B3D4E5F6"
const response = await fetch("https://letsbot.net/api/v1/message/send/forward/message", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"messageId": "3EB0C4F1A2B3D4E5F6",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send/forward/message');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'messageId' => '3EB0C4F1A2B3D4E5F6',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send/forward/message",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"messageId": "3EB0C4F1A2B3D4E5F6",
},
)
print(response.json())