//rest of code
//flow
let message= {
name: "lzgoflow",
language: "en_US",
category: "MARKETING",
components: [
{
type: "body",
text: "hello there",
},
{
type: "BUTTONS",
buttons: [
{
type: "FLOW",
text: "lzgo",
flow_id: 937561724890552,
navigate_screen: "lzgo flow",
flow_action: "navigate",
},
],
},
],
};
axios({
method: "POST",
url:
"https://graph.facebook.com/v12.0/" +
phone_number_id +
"/messages?access_token=" +
token,
data: message,
headers: { "Content-Type": "application/json" },
})
.then((response) => {
console.log("Message sent successfully:", response.data);
})
.catch((error) => {
console.error("Error sending message:", error.message);
});
}
res.sendStatus(200);
} else {
res.sendStatus(404);
}
});
这是我的 node.js 代码,请求发送 WhatsApp 流消息,但每次运行它时都会出现此错误
Error sending message: Request failed with status code 400
我检查了所有详细信息(流 ID、名称和语言代码),它们都是相同的,但它仍然给我这个错误。