LetsBot Menu
Začať Slovenčina Jazyk

Meta Business Partner Spoločnosť registrovaná vo Veľkej Británii

Jazyk

Messages · endpoint API

POST /api/v1/message/send/forward/message Nový

Forward message

Forward a stored message to another phone number.

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.

Polia formulára

PolePríklad
phone{{phone}}
messageId3EB0C4F1A2B3D4E5F6

Ukážková požiadavka

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())

Pripravení, keď budete vy

Vyskúšajte tento endpoint na vlastnom čísle

API funguje počas bezplatnej skúšobnej verzie. Vytvorte si účet, pripojte svoje číslo WhatsApp a skopírujte kľúč v časti API → Overovacie údaje.