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"])
Links #
Tell A Botβ sign up, manage numbers, configure webhooks - API referenceβ full documentation - Python SDK on GitHubβ source