const chat = {
secret: "API_SECRET",
account: "ACCOUNT_CODE",
recipient: "+905012345678",
type: "text",
message: "Hello World!"
};
fetch('https://forcemsg.com/api/send/whatsapp', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(chat)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));