Skip to main content

smsgora

SMS Gora SMS Gateway - official Python client: send and receive SMS through your own Android phones. By Tekservix.

Python client for the SMS Gora SMS Gateway API.

SMS Gora turns Android phones with ordinary SIM cards into an SMS gateway. Your server calls the API, a linked phone sends the text, and replies and delivery reports come back to you. There's no sender ID registration and no per-message fee from us: your mobile operator bills the texts like any SMS.

  • Zero dependencies (standard library only), Python 3.8+
  • Works in Django, Flask, FastAPI, scripts and cron jobs
  • Webhook signature check built in

Install

pip install smsgora

Quick start

Create an API key in the SMS Gora dashboard (SMS Gora -> API keys) and keep it on your server.

import os
from smsgora import SmsGora

sms = SmsGora(api_key=os.environ["SMSGORA_KEY"])

result = sms.send_sms(to="+15551234567", message="Your verification code is 482913")
print(result["message_ids"])  # [1873]

Sending

from datetime import datetime, timezone

# Several recipients (up to 1,000 per call)
sms.send_sms(to=["+15551234567", "+447700900123"], message="Your order has shipped")

# From a chosen phone and SIM, scheduled for later
sms.send_sms(
    to="+15551234567",
    message="Reminder: your appointment is tomorrow at 10:00",
    device_id=42,
    sim_slot=1,  # 0 = SIM 1, 1 = SIM 2
    schedule_at=datetime(2026, 12, 1, 8, 0, tzinfo=timezone.utc),
)

# Different texts for different people in one call (up to 5,000 recipients)
sms.send_bulk_sms(
    42,
    message_template="Hello, your parcel is ready for pickup.",
    messages=[
        {"recipients": ["+15551234567"], "message": "Hi Aline, parcel #1042 is ready."},
        {"recipients": ["+15557654321"]},
    ],
)

Delivery status and incoming SMS

msg = sms.get_message(1873)
print(msg["status"])  # queued -> dispatched -> sent -> delivered (or failed)

sms.cancel_message(1874)  # works while queued or scheduled

inbox = sms.list_received_sms(since="2026-11-01", limit=50)
phones = sms.list_devices()
account = sms.get_account()

Anything else in the API reference is one call away:

batch = sms.request("GET", "/batches/311")

Webhooks

Add your HTTPS URL in SMS Gora -> Webhooks (or with create_webhook) and keep the secret. Each request carries X-SmsGora-Signature: sha256=..., an HMAC-SHA256 of the raw body. Check it before trusting the request. Flask example:

import json, os
from flask import Flask, request, abort
from smsgora import verify_webhook

app = Flask(__name__)

@app.post("/sms/webhook")
def sms_webhook():
    if not verify_webhook(request.get_data(), request.headers.get("X-SmsGora-Signature"),
                          os.environ["SMSGORA_WEBHOOK_SECRET"]):
        abort(401)
    event = json.loads(request.get_data())
    if event["event"] == "sms.received":
        print(event["data"]["from"], event["data"]["message"])
    return "", 200  # answer within 10 seconds; queue slow work

In Django use request.body; in FastAPI use await request.body(). Always pass the raw bytes, not re-encoded JSON.

Errors

Failed calls raise SmsGoraError with status, message, field errors and, on 429, retry_after in seconds.

from smsgora import SmsGoraError

try:
    sms.send_sms(to="+15551234567", message="Hi")
except SmsGoraError as err:
    if err.status == 429:
        pass  # rate limit (300 requests/minute per key) or plan limit reached

Never ship the key inside a browser or mobile app: anyone could read it. Call the API from your server.

Migrating from TextBee

SMS Gora accepts TextBee-style requests, so most integrations switch by changing the base URL and key. See the compatibility notes.

Good to know

A phone-based gateway suits OTPs, order alerts, reminders and two-way conversations at moderate volume. It isn't meant for mass marketing blasts, and in the US high-volume business texting belongs on registered 10DLC or toll-free numbers.

More from Tekservix

License

MIT

Metadata

Release files for smsgora 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smsgora 1.0.2
File Size Uploaded Provenance Actions
smsgora-1.0.2.tar.gz 7.9 kB With provenance Details for smsgora-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smsgora 1.0.2
File Interpreter ABI Platform Actions
smsgora-1.0.2-py3-none-any.whl Python 3 none any Details for smsgora-1.0.2-py3-none-any.whl

Total release size: 14.8 kB

Release files / smsgora-1.0.2.tar.gz

Download URL smsgora-1.0.2.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
59249e9e2be313459aa058e79e02d74ccfa386800b4b3ef19a845411d4764e01
BLAKE2b-256 checksum
How to use checksums
8c6a19511e1f46d6b2c2e667f0c064a4b3a24426e46d95013581f02cacad9389
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / smsgora-1.0.2-py3-none-any.whl

Download URL smsgora-1.0.2-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf93e446fed1d3d61bae45cbf405414da07ef883a73a4226dd24d69b3ad2174c
BLAKE2b-256 checksum
How to use checksums
6ccacd827dcae28dfdf06efedaebe33a5248dc1c617a888acb3b3b77c93c4035
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for smsgora 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for smsgora-1.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page