let messageData = {
phoneNumber: '1234567890', // the recipient's phone number
message: 'Hello, this is a test message.'
};
fetch('/send-sms', {
method: 'POST',
body: JSON.stringify(messageData),
headers: {
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
No comments:
Post a Comment