Replace BASE_URL with your GSM Modem device URL (e.g. http://192.168.1.100:8080).

Python

Send SMS

Send SMS
import requests

BASE_URL = 'http://192.168.1.100:8080'

response = requests.post(
    f\'{BASE_URL}/api/send-sms\',
    json={\'phone\': \'+49123456789\', \'message\': \'Hello from GSM Modem API\'},
    headers={\'Content-Type\': \'application/json\'},
    auth=(\'USERNAME\', \'PASSWORD\')
)
print(response.json())
footer-frame