JavaScript
Send SMS
Send SMS
const BASE_URL = 'http://192.168.1.100:8080';
fetch(`${BASE_URL}/api/send-sms`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Basic ' + btoa('USERNAME:PASSWORD') },
body: JSON.stringify({ phone: '+49123456789', message: 'Hello from GSM Modem API' })
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));