💬 WhatsApp API @ Best Rate | Zero Setup Fee → 99.9% Uptime OTP Delivery — Try FREE Demo! 🏆 10,000+ Registered Businesses — 2,000+ Enterprise Clients Served 🚀 API Integration in Under 5 Minutes 🏅 Verified Business Badge with RCS Messaging 💬 WhatsApp API @ Best Rate | Zero Setup Fee → 99.9% Uptime OTP Delivery — Try FREE Demo! 🏆 10,000+ Registered Businesses — 2,000+ Enterprise Clients Served 🚀 API Integration in Under 5 Minutes 🏅 Verified Business Badge with RCS Messaging
Talk to Sales: India 1800 102 1822

Bulk SMS API for Developers

Sample code in XML, Java, PHP, Python, C#, Windows 8, Android, iOS, VB6 and Java-for-XML to add SMS, OTP and alerts to any application through the SMSGatewayHub API.

10 code samplesHTTP, HTTPS & SMPPJSON responsesFree test credits
10Languages and platforms
99.9%Uptime SLA
2-6 secTypical delivery
10,000+Registered businesses

Quick Answer

SMSGatewayHub's developer hub gives programmers ready-made sample code in XML, Java, PHP, Python, C#, Windows 8, Android, iOS, VB6 and Java-for-XML to call the SMSGatewayHub bulk SMS API. You authenticate with an API key, send OTP, transactional or promotional SMS over HTTP, HTTPS or SMPP, and read JSON delivery reports. Bulk SMS is on Pay As You Go pricing with a 99.9% uptime SLA.

How do developers add SMS to an application?

Most applications need to send text messages at some point - a login OTP, an order confirmation, a payment alert or an appointment reminder. With SMSGatewayHub you do not need telecom contracts or SMSC software: your code makes a request to our API with your API key, sender ID, recipient number and message, and we deliver it through TRAI DLT-registered routes to every Indian operator.

There are three ways to connect. The HTTP SMS API and the encrypted HTTPS SMS API use simple URL parameters and return JSON, which suits websites, mobile backends, CRMs and ERPs. The SMPP API keeps a persistent connection open for aggregators and very high-volume senders. If you need SMS, WhatsApp, RCS and voice in one integration, look at our Communications API.

The code samples on this page show how to call the API from the most common languages and platforms. Please note that some of the code has been supplied to SMSGATEWAYHUB by clients; as such, accuracy is not guaranteed by SMSGATEWAYHUB, and you should test it against the current API reference before production use.

Sample code available for your stack

Pick your language; every sample calls the same SMSGatewayHub API.

XML

Send requests as XML for systems that exchange structured payloads.

Java and Java for XML

Plain Java HTTP calls plus a Java sample that builds XML requests.

PHP

cURL-based sample for PHP sites, Laravel and WordPress, plus a full PHP and Python OTP guide on our blog.

Python

Use requests or urllib to send SMS from Django, Flask or scripts.

C# and Windows 8

Samples for ASP.NET, desktop .NET and Windows 8 apps.

Android and iOS

Mobile samples - call your own backend in production so the API key stays off the device.

VB6

Legacy Visual Basic 6 sample for older desktop software.

Node.js guides

Follow the Node.js SMS API code guide and the Node.js OTP tutorial.

Core API parameters every sample uses

Full endpoint formats and JSON responses are on the HTTP and HTTPS API pages.

ParameterWhat it does
APIKeyAuthenticates your account in place of username and password
senderidYour approved 6-character DLT sender ID
channelRoute type: promotional, transactional or OTP
routeRoute ID assigned to your account
DCS0 for English text, 8 for Unicode / regional languages
numberRecipient mobile number(s), comma-separated
textMessage content matching your DLT template
schedtime / groupidOptional scheduling time and saved contact group

Each request can include up to 100 mobile numbers.

From signup to first SMS

  1. Create an account

    Register free and get test credits to try the API.

  2. Finish DLT registration

    Register your entity, sender ID and templates on DLT; our team helps you through it.

  3. Copy a sample

    Choose your language above and insert your API key, sender ID and route.

  4. Test in sandbox

    Send to your own number and inspect the JSON response and delivery report.

  5. Go live and monitor

    Switch to production traffic and track delivery with reports or webhooks.

Developer guides and tools

Webhooks

Receive delivery status in real time - how webhooks work.

IP whitelisting

Lock your key to your servers - enable IP whitelisting.

Sandbox testing

Test safely using the sandbox integration guide.

Troubleshooting

Fix failed calls with common API errors and fixes.

No-code plugins

Use the WordPress/WooCommerce SMS plugin or the SMS Excel plugin instead of writing code.

Frequently Asked Questions

Any language that can make an HTTP request can use the SMSGatewayHub API. Sample code is available for XML, Java, PHP, Python, C#, Windows 8, Android, iOS, VB6 and Java-for-XML, and blog guides cover Node.js.

SMSGatewayHub offers a free developer account with test credits so you can integrate and test before buying. Production traffic uses Pay As You Go pricing: you buy credits as needed and pay only for delivered SMS; see https://www.smsgatewayhub.com/pricing or talk to sales on 1800 102 1822.

Some samples were supplied to SMSGatewayHub by clients, so accuracy is not guaranteed. Treat them as starting points and verify parameters against the current HTTP and HTTPS API reference.

No. Store your API key on your own server and let the mobile app call your backend, which then calls SMSGatewayHub. This prevents key theft and SMS-pumping abuse.

Yes. TRAI requires a DLT-registered entity, sender ID and template for every commercial SMS to Indian numbers. SMSGatewayHub helps you complete registration and map templates in your panel.

Call the GetDelivery endpoint with the JobId returned when you send, download reports from the panel, or configure SMSGatewayHub webhooks to push status updates to your server.

Start building with the SMSGatewayHub API

Create a free account, grab your API key and send your first SMS from code in minutes. Developer support: +91 99079 22122.