SMS API coding examples for Java, PHP, JavaScript, C#, Python and more
This page collects ready-to-use coding examples for the GSM Modem HTTP API. You can use these snippets in Java, PHP, JavaScript, C#, Python and other languages to send and receive SMS messages from your own applications.
Each language page shows how to call the GSM Modem API endpoints, how to pass the recipient phone number and message body as JSON, and how to handle responses and errors. You can copy, paste and adapt the code for cron jobs, internal tools, monitoring systems, alerts or customer notifications.
Start by selecting a language or type from the sidebar. On each language page you will find Send SMS and (where available) Receive SMS examples, plus a short description of how to integrate them into your project.
- Multi-language support: Java, PHP, JavaScript, C#, Python and more
- Simple HTTP/JSON API: no special SDKs required
- Real GSM modem: use your Android device and SIM card
- Perfect for automation: alerts, OTP codes, system notifications
Replace BASE_URL in the examples with your GSM Modem device URL
(for example http://192.168.1.100:8080) so your code can reach the API from your
network.