{"slug": "python-sdk-for-tell-a-bot-api-automate-your-sms-verification", "title": "Python SDK for Tell A Bot API: Automate Your SMS Verification", "summary": "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.", "body_md": "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](https://www.tellabot.com) solves this — it gives you temporary US phone numbers on demand, receives the SMS, and hands you back the OTP code. All via API.\n\nWe just published a **Python SDK** on GitHub, so I wanted to walk through what it looks like in practice.\n\n## What is Tell A Bot?\n\n[Tell A Bot](https://www.tellabot.com) 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.\n\nCommon use cases:\n\n- Automating account registration or verification flows in tests\n- Receiving OTP codes in scripts without a physical SIM\n- Spinning up multiple accounts for a service during development\n\n## Installation\n\n```\npip install get-sms-online\n```\n\nOr directly from GitHub:\n\n```\npip install git+https://github.com/getsms-online/get.sms.online-python.git\n```\n\nGenerate your API key at **Account → Profile** in Tell A Bot's members area.\n\n## The simplest case — request a number and wait for the code\n\n``` python\nfrom getsms import GetSMSClient, GetSMSError\n\nclient = GetSMSClient(user=\"your_username\", api_key=\"your_api_key\")\n\n# Check your balance first\nprint(f\"Balance: ${client.balance()}\")\n\n# Request a number for WhatsApp and wait for the SMS\nrequests = client.request_number(\"WhatsApp\")\nreq = requests[0]\nprint(f\"Your number: +{req['mdn']}\")\n\nsms = client.wait_for_sms(req[\"id\"], timeout=900)\nif sms:\n    print(f\"SMS: {sms['reply']}\")\n    print(f\"Code: {sms['pin']}\")\nelse:\n    print(\"No SMS received in time\")\n```\n\n`wait_for_sms`\n\npolls the API every 15 seconds (the recommended minimum) and returns the message once an SMS arrives, or `None`\n\non timeout.\n\n## Error handling\n\n``` python\nfrom getsms import GetSMSClient, GetSMSError\n\nclient = GetSMSClient(user=\"your_username\", api_key=\"your_api_key\")\n\ntry:\n    requests = client.request_number(\"Google\")\n    req = requests[0]\n\n    sms = client.wait_for_sms(req[\"id\"])\n    if sms:\n        print(f\"Got code: {sms['pin']}\")\n    else:\n        print(\"Timed out — no SMS received\")\n\nexcept GetSMSError as e:\n    # API-level errors: invalid service name, no numbers available, etc.\n    print(f\"API error: {e}\")\nexcept Exception as e:\n    # Network errors\n    print(f\"Request failed: {e}\")\n```\n\n## Reject a number you don't want\n\nIf the assigned number looks wrong or you want to skip it, reject it — it won't be offered to you again:\n\n```\nrequests = client.request_number(\"Telegram\")\nreq = requests[0]\n\nif req[\"mdn\"].startswith(\"1212\"):\n    client.reject(req[\"id\"])   # NYC numbers blocked by the service? Skip it.\n```\n\n## Webhooks instead of polling\n\nIf 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`\n\n, `id`\n\n, `reply`\n\n, `pin`\n\n, and `price`\n\n. No polling loop needed.\n\n## Check available services and pricing\n\n```\n# All services\nservices = client.list_services()\nfor s in services:\n    print(f\"{s['name']}: ${s['price']} ({s['otp_available']} available)\")\n\n# Single service — also returns recommended_markup for priority bidding\ninfo = client.list_services(\"Google\")\nprint(info[0][\"recommended_markup\"])\n```\n\n## Links\n\n-\n[Tell A Bot](https://www.tellabot.com)— sign up, manage numbers, configure webhooks -\n[API reference](https://www.tellabot.com/api_command_reference.php)— full documentation -\n[Python SDK on GitHub](https://github.com/getsms-online/get.sms.online-python)— source", "url": "https://wpnews.pro/news/python-sdk-for-tell-a-bot-api-automate-your-sms-verification", "canonical_source": "https://dev.to/tellabot_sms/python-sdk-for-tell-a-bot-api-automate-your-sms-verification-2c3f", "published_at": "2026-05-24 06:38:41+00:00", "updated_at": "2026-05-24 07:17:21.160203+00:00", "lang": "en", "topics": ["developer-tools", "open-source", "products"], "entities": ["Tell A Bot", "Python SDK", "GitHub", "WhatsApp"], "alternates": {"html": "https://wpnews.pro/news/python-sdk-for-tell-a-bot-api-automate-your-sms-verification", "markdown": "https://wpnews.pro/news/python-sdk-for-tell-a-bot-api-automate-your-sms-verification.md", "text": "https://wpnews.pro/news/python-sdk-for-tell-a-bot-api-automate-your-sms-verification.txt", "jsonld": "https://wpnews.pro/news/python-sdk-for-tell-a-bot-api-automate-your-sms-verification.jsonld"}}