# otpwatch > Working recipes for receiving SMS one-time codes in automated tests and apps through the handler_api.php protocol (base URL https://sim-aggregator.org/stubs/handler_api.php): clients in Python, Node.js, C#, PHP and Go, Playwright/Cypress/Selenium patterns, CI setup, error codes, country ids, service codes, cancellation, price caps and USDT TRC-20 funding. Prices are "from" values per one-off activation in USD, snapshot 24 Nov 2026 (UTC). Every page has a Markdown copy at the same path plus `.md`; the links below point to those copies. ## Start - [Overview](https://otpwatch.com/index.md): Get a real SMS one-time code inside a test or script in about ten lines: order a number, poll getStatus, close the order. Recipes for handler_api.php. - [handler_api.php reference](https://otpwatch.com/handler-api.md): All nine actions of the handler_api.php SMS API with parameters, example requests and every reply string, plus the parsing rules that trip up new clients. - [Migrate by base URL](https://otpwatch.com/migrate-base-url.md): Point a handler_api.php integration at sim-aggregator.org: swap base URL and key, re-check ids, timers and refunds, then a staging run that costs cents. - [For software owners](https://otpwatch.com/software-program.md): Run a bot, panel or QA service that buys numbers through handler_api.php? Tag its orders with softId and get a share of the whole volume, with no cap. ## Bots and panels - [Telegram number bot](https://otpwatch.com/telegram-number-bot.md): Build a Telegram bot that sells SMS numbers: getPrices plus your markup, one polling worker, cancel and refund. Full code in Python and Node.js, no packages. - [OTP number panel](https://otpwatch.com/otp-number-panel.md): Run an OTP number panel or website on handler_api.php: where the markup goes, how cent rounding changes it, and what a panel must not sell. Code in Python and Node. ## Clients - [Python](https://otpwatch.com/python.md): A 90-line Python client for SMS codes over handler_api.php: typed errors, polling inside the rate limit, automatic cancel on failure and offline tests. - [Node.js](https://otpwatch.com/nodejs.md): A dependency-free Node.js 18+ client for receiving SMS codes over handler_api.php, with timeouts, backoff, reliable cleanup, a shared poller and node:test tests. - [C# / .NET](https://otpwatch.com/csharp.md): A .NET 10 HttpClient client for SMS codes over handler_api.php: decimal prices, CancellationToken, await using cleanup, DI setup and stub-handler tests. - [PHP](https://otpwatch.com/php.md): A PHP 8.1+ cURL client for SMS codes over handler_api.php: try/finally cleanup, an injectable transport for PHPUnit, and polling outside web requests. - [Go](https://otpwatch.com/go.md): A standard-library Go client for SMS codes over handler_api.php: context deadlines, typed errors for errors.As, a shared ticker limiter and httptest tests. ## Test runners - [Playwright](https://otpwatch.com/playwright-otp-testing.md): Test phone verification end to end in Playwright: a typed sms fixture that orders a number when the form is ready, waits for the code and always cleans up. - [Cypress](https://otpwatch.com/cypress-otp-testing.md): Cypress recipe for SMS verification tests: the API key stays in Node via cy.task, a recursive poll waits for the code, and afterEach cancels anything left open. - [Selenium](https://otpwatch.com/selenium-otp-testing.md): Selenium WebDriver and pytest recipe for SMS verification: a fixture that hands out numbers on demand, explicit waits and a teardown that always cancels. - [CI and GitHub Actions](https://otpwatch.com/ci-sms-verification.md): Run SMS OTP tests in GitHub Actions or GitLab CI: key in secrets, a preflight that checks balance and price, maxPrice as a cost cap, cleanup that always runs. - [AI agent testing](https://otpwatch.com/ai-agent-phone-verification-testing.md): Let an AI agent run your app's QA flows that need an SMS code: three narrow tools, an allowlist, a spend cap and an API key the model never sees. ## Reference - [Error codes](https://otpwatch.com/error-codes.md): Every handler_api.php refusal, what it means and what your code should do next: retry, back off, fix the request or stop. With a classifier in JS and Python. - [Country ids](https://otpwatch.com/country-ids.md): Numeric ids for the handler_api.php country parameter, the lowest current price per country, and code that maps ISO codes to ids with getCountries. - [Service codes](https://otpwatch.com/service-codes.md): Codes for the handler_api.php service parameter: tg Telegram, wa WhatsApp, go Google, dr OpenAI, acz Claude and more, with lowest prices and lookup code. ## Money - [Price control](https://otpwatch.com/price-control.md): Keep an SMS test budget predictable: read prices with getPrices, cap every order with maxPrice, handle WRONG_MAX_PRICE, and size the balance for parallel runs. - [Cancel and refund](https://otpwatch.com/cancel-and-refund.md): How cancellation and refunds work in handler_api.php: setStatus 8, EARLY_CANCEL_DENIED retries, automatic refunds when no SMS arrives, rentals and a cancel helper. - [Rent a number](https://otpwatch.com/rent-number-api.md): Rent a number via handler_api.php with duration d1, d3 or d7: one staging test account, repeat login codes included, cancel rules and when it beats activations. - [Fund with USDT TRC-20](https://otpwatch.com/fund-api-balance-usdt-trc20.md): Top up the balance behind your handler_api.php key with USDT on TRON: the network choice, the T address check, fees and the TRX activation, then a getBalance alert. ## Account - [API key](https://otpwatch.com/agent/key): sign-up on SimAggregator; the key is issued in its dashboard. - [Software program](https://otpwatch.com/agent/partner): for bots, panels and services that order numbers for other people. ## Optional - [Full text of every page](https://otpwatch.com/llms-full.txt) - [Agent skills](https://otpwatch.com/.well-known/agent-skills/index.json): SKILL.md files for coding agents, install with `npx skills add https://otpwatch.com`