Skip to content

SMS API

TOGETHER SMS / DEVELOPERS

Connect your application.
Keep your customers informed.

Connect your website or business system to SMS API in Egypt. Send branded verification messages, alerts and updates when events happen in your application.

HTTPS GETUTF-8Plain-text response
BALANCE REQUEST / EXAMPLE
GET /sendsms.php
  ?user=YOUR_USERNAME
  &password=YOUR_PASSWORD
  &action=get

Host: togethersms.com
3956.00Illustrative balance response, not a real account.

ONE API. USEFUL CUSTOMER MOMENTS.

Useful messages, triggered by your business.

Choose an event in your application, prepare the right message, and let your backend call the SMS gateway.

01

Phone verification

Send verification codes; your application manages expiry and attempt limits.

02

Invoices & instalments

Remind customers of due amounts, dates and next payment steps.

03

Orders & shipping

Turn order events into useful customer updates.

04

Appointments & bookings

Send timely reminders for upcoming appointments.

05

Loyalty updates

Notify customers when loyalty balances or rewards change.

06

Marketing follow-ups

Send relevant follow-ups to recipients who opted in.

START WITH A BALANCE CHECK

A clear path to your first integration.

1. Activate your account and sender

Complete onboarding and required business documents to obtain API credentials and an approved sender.

2. Connect from your backend

Store credentials securely on your server, then retrieve your account balance.

3. Test one controlled message

Use your own test device and approved sender; check acceptance, cost and observed delivery.

Endpoint for new integrations

https://togethersms.com/sendsms.php

For balance: send user, password and action=get. A valid response is numeric plain text and can contain decimals.

cURL / BALANCE
# Run on your server; load secrets from your environment.
curl --get 'https://togethersms.com/sendsms.php' \
  --connect-timeout 10 --max-time 20 \
  --data-urlencode "user=${TOGETHER_SMS_USER}" \
  --data-urlencode "password=${TOGETHER_SMS_PASSWORD}" \
  --data-urlencode 'action=get'

# Sending is a separate request. Use an approved test recipient.
# Add numbers, sender, message and lang; omit action=get.
Integrate from your backend only. Never embed the provider password in a browser or mobile app, or log a request URL containing it.

HTTP API REFERENCE

Parameters and responses, clearly defined.

SMS sending uses HTTPS GET with query parameters. This table applies to sending; action=get is reserved for balance retrieval.

ParameterRequired value
userAPI account username.
passwordAPI account password; store on your server.
numbersInternational digits, or a comma-separated list; no + or spaces.
senderYour approved, activated Sender ID.
messageUTF-8 text; URL-encode every query value once.
langen for English; ar for Arabic / Unicode.
SEND REQUEST / PLACEHOLDERS
GET /sendsms.php?user=YOUR_USERNAME&password=YOUR_PASSWORD
    &numbers=YOUR_AUTHORIZED_TEST_NUMBER
    &sender=YOUR_APPROVED_SENDER
    &message=Your%20order%20is%20ready&lang=en
Host: togethersms.com

Line breaks are for readability; the real request is one URL. Encode values with your HTTP library and use an authorized test recipient.

Validate the full response

Plain-text bodyMeaning and next step
1Request accepted; not proof of handset delivery.
1:201001234567Accepted with recipient list; validate the entire response.
0General rejection.
Invalid loginCheck your account credentials securely.
Missing or Empty FieldCheck all required fields.
Insufficient BalanceCheck available balance and required units.
Invalid SenderCheck the approved Sender ID.
Sender name is not activatedComplete Sender ID activation.
Invalid Message LanguageCheck lang and text encoding.
HTTP 200 alone does not prove acceptance. An unknown body or timeout is an unknown outcome; investigate before resending to prevent duplicates.

BACKEND EXAMPLES

Start with the language your team uses.

Balance examples load credentials from environment variables. This documentation page does not execute API requests.

cURL

cURL / BALANCE
# Run on your server; load secrets from your environment.
curl --get 'https://togethersms.com/sendsms.php' \
  --connect-timeout 10 --max-time 20 \
  --data-urlencode "user=${TOGETHER_SMS_USER}" \
  --data-urlencode "password=${TOGETHER_SMS_PASSWORD}" \
  --data-urlencode 'action=get'

# Sending is a separate request. Use an approved test recipient.
# Add numbers, sender, message and lang; omit action=get.

Node.js

Node.js / BALANCE
// Backend only. Never expose provider credentials in a browser.
const query = new URLSearchParams({
  user: process.env.TOGETHER_SMS_USER,
  password: process.env.TOGETHER_SMS_PASSWORD,
  action: 'get'
});
const response = await fetch(
  'https://togethersms.com/sendsms.php?' + query,
  { redirect: 'error', signal: AbortSignal.timeout(20000) }
);
const body = (await response.text()).trim();
if (!response.ok || !/^[0-9]+(?:\.[0-9]+)?$/.test(body)) {
  throw new Error('Balance request was not accepted');
}
// Keep decimal precision; do not log the request URL.

PHP

PHP / BALANCE
<?php
// Backend only. Secrets come from your deployment environment.
$query = http_build_query(array(
  'user' => getenv('TOGETHER_SMS_USER'),
  'password' => getenv('TOGETHER_SMS_PASSWORD'),
  'action' => 'get'
), '', '&', PHP_QUERY_RFC3986);
$ch = curl_init('https://togethersms.com/sendsms.php?' . $query);
curl_setopt_array($ch, array(
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_CONNECTTIMEOUT => 10,
  CURLOPT_TIMEOUT => 20
));
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($body === false || $status < 200 || $status >= 300 ||
    !preg_match('/\A[0-9]+(?:\.[0-9]+)?\z/', trim($body))) {
  throw new RuntimeException('Balance request was not accepted');
}

Python

Python / BALANCE
# Backend only. Requires the requests package.
import os
import re
import requests

response = requests.get(
    'https://togethersms.com/sendsms.php',
    params={
        'user': os.environ['TOGETHER_SMS_USER'],
        'password': os.environ['TOGETHER_SMS_PASSWORD'],
        'action': 'get'
    },
    timeout=(10, 20),
    allow_redirects=False
)
body = response.text.strip()
if not (200 <= response.status_code < 300 and
        re.fullmatch(r'[0-9]+(?:\.[0-9]+)?', body)):
    raise RuntimeError('Balance request was not accepted')
# Timeout values are connect/read timeouts, not a strict total deadline.

C# / .NET

C# / .NET / BALANCE
// Backend only. Use a supported .NET runtime.
using var handler = new HttpClientHandler { AllowAutoRedirect = false };
using var client = new HttpClient(handler) {
    Timeout = TimeSpan.FromSeconds(20)
};
string user = Environment.GetEnvironmentVariable("TOGETHER_SMS_USER")!;
string password = Environment.GetEnvironmentVariable("TOGETHER_SMS_PASSWORD")!;
string url = "https://togethersms.com/sendsms.php?user=" +
    Uri.EscapeDataString(user) + "&password=" +
    Uri.EscapeDataString(password) + "&action=get";
using var response = await client.GetAsync(url);
string body = (await response.Content.ReadAsStringAsync()).Trim();
if (!response.IsSuccessStatusCode ||
    !System.Text.RegularExpressions.Regex.IsMatch(
        body, @"\A[0-9]+(?:\.[0-9]+)?\z")) {
    throw new InvalidOperationException("Balance request was not accepted");
}
Flutter and mobile apps: the app calls your backend, and your backend calls Together SMS. See the guide for credential protection and outcome handling.

DEVELOPER DOCUMENTATION / ENGLISH

A practical guide your team can keep.

Request and response reference, integration examples, failure handling and endpoint migration guidance.

PDF · v1.2 · 06 Nov 2026
Download API guide (English)
Already using the legacy endpoint?
https://sms.masrbokra.com/sendsms.php
Target migration date: 30 June 2027. Keep the same query parameters and test your credentials and responses before updating production. Follow our notices for the confirmed retirement plan.

Questions your team will ask.

Should credentials go inside a mobile app?

No. Flutter and web clients call your backend; only your backend stores SMS credentials and calls the gateway.

Does response 1 mean the SMS was delivered?

It means gateway acceptance. This contract does not document handset delivery confirmation or a delivery-report endpoint.

What if a send request times out?

Treat the outcome as unknown and investigate before resending. The gateway may already have accepted it; automatic retries can duplicate messages.

Does this API provide scheduling?

The supplied contract has no scheduling parameter. Your application can manage timing; dashboard features do not automatically imply corresponding API endpoints.

How many recipients can one request contain?

The contract supports comma-separated recipients. Confirm batch, URL-length and request-rate limits with our team before large campaigns.

Does the old endpoint stop immediately?

No. The target migration date is 30 June 2027. Test the new endpoint and follow our migration notices before changing production.

LET'S CONNECT YOUR BUSINESS

Have an application ready? Let’s connect it.

Tell us your use case so we can review sender activation and onboarding requirements.