cd /news/developer-tools/python-sdk-for-tell-a-bot-api-automa… Β· home β€Ί topics β€Ί developer-tools β€Ί article
[ARTICLE Β· art-13341] src=dev.to β†— pub= topic=developer-tools verified=true sentiment=↑ positive

Python SDK for Tell A Bot API: Automate Your SMS Verification

The article announces the release of a Python SDK for the Tell A Bot API, which provides temporary US phone numbers to receive SMS messages and OTP codes for over 700 services. The SDK allows developers to automate phone verification in bots, scrapers, and testing pipelines by requesting numbers, waiting for SMS, and extracting PIN codes via API calls or webhooks. Key features include balance checking, number rejection, error handling, and service listing with pricing and availability.

read3 min views48 publishedMay 24, 2026

If you've ever built a bot, scraper, or testing pipeline that needs to verify a phone number, you know the pain: SIM cards, forwarding services, juggling multiple numbers manually. Tell A Bot solves this β€” it gives you temporary US phone numbers on demand, receives the SMS, and hands you back the OTP code. All via API.

We just published a Python SDK on GitHub, so I wanted to walk through what it looks like in practice.

What is Tell A Bot? #

Tell A Bot is a service for receiving SMS online using temporary US phone numbers. You request a number for one of 700+ supported services, the number waits for an incoming SMS, and once it arrives you read the message and the extracted PIN code through the API.

Common use cases:

  • Automating account registration or verification flows in tests
  • Receiving OTP codes in scripts without a physical SIM
  • Spinning up multiple accounts for a service during development

Installation #

pip install get-sms-online

Or directly from GitHub:

pip install git+https://github.com/getsms-online/get.sms.online-python.git

Generate your API key at Account β†’ Profile in Tell A Bot's members area.

The simplest case β€” request a number and wait for the code #

from getsms import GetSMSClient, GetSMSError

client = GetSMSClient(user="your_username", api_key="your_api_key")

print(f"Balance: ${client.balance()}")

requests = client.request_number("WhatsApp")
req = requests[0]
print(f"Your number: +{req['mdn']}")

sms = client.wait_for_sms(req["id"], timeout=900)
if sms:
    print(f"SMS: {sms['reply']}")
    print(f"Code: {sms['pin']}")
else:
    print("No SMS received in time")

wait_for_sms

polls the API every 15 seconds (the recommended minimum) and returns the message once an SMS arrives, or None

on timeout.

Error handling #

from getsms import GetSMSClient, GetSMSError

client = GetSMSClient(user="your_username", api_key="your_api_key")

try:
    requests = client.request_number("Google")
    req = requests[0]

    sms = client.wait_for_sms(req["id"])
    if sms:
        print(f"Got code: {sms['pin']}")
    else:
        print("Timed out β€” no SMS received")

except GetSMSError as e:
    print(f"API error: {e}")
except Exception as e:
    print(f"Request failed: {e}")

Reject a number you don't want #

If the assigned number looks wrong or you want to skip it, reject it β€” it won't be offered to you again:

requests = client.request_number("Telegram")
req = requests[0]

if req["mdn"].startswith("1212"):
    client.reject(req["id"])   # NYC numbers blocked by the service? Skip it.

Webhooks instead of polling #

If you're handling volume, configure a webhook URL at Account β†’ Profile. Tell A Bot will POST to your endpoint the moment an SMS arrives, with fields including event

, id

, reply

, pin

, and price

. No polling loop needed.

Check available services and pricing #

services = client.list_services()
for s in services:
    print(f"{s['name']}: ${s['price']} ({s['otp_available']} available)")

info = client.list_services("Google")
print(info[0]["recommended_markup"])

Tell A Botβ€” sign up, manage numbers, configure webhooks - API referenceβ€” full documentation - Python SDK on GitHubβ€” source

── more in #developer-tools 4 stories Β· sorted by recency
── more on @tell a bot 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/python-sdk-for-tell-…] indexed:0 read:3min 2026-05-24 Β· β€”