Skip to content

smscode-gg/sdks

Repository files navigation

SMSCode SDKs

CI @smscode/sdk on npm smscode on PyPI Documentation MIT license

Official TypeScript, JavaScript, and Python SDKs for the SMSCode virtual-number API.
Rent temporary phone numbers, receive OTP/SMS verification codes, and automate phone verification flows.

Why SMSCode SDKs

  • One public API contract for TypeScript/JavaScript and Python, validated against the same OpenAPI source.
  • Money-safe order creation with idempotency keys, typed errors, and retry behavior designed for paid API calls.
  • OTP lifecycle helpers for waiting, resending, finishing, canceling no-OTP orders, and verifying webhook signatures.
  • /v2 USD-native API by default, with the legacy /v1 IDR API still available where needed.

Packages

Package Runtime Registry Install Docs
@smscode/sdk TypeScript / JavaScript npm bun add @smscode/sdk or npm i @smscode/sdk README
smscode Python 3.10+ PyPI pip install smscode README

Quick Start

TypeScript / JavaScript

npm i @smscode/sdk
import { SmscodeClient } from "@smscode/sdk";

const client = new SmscodeClient({ token: process.env.SMSCODE_TOKEN! });
const { balance } = await client.balance.get();

console.log(`USD balance: ${balance.amount}`);

Python

pip install smscode
import os

from smscode import SmscodeClient

with SmscodeClient(token=os.environ["SMSCODE_TOKEN"]) as client:
    balance = client.balance.get()
    print(f"USD balance: {balance.balance.amount}")

Supported Workflows

  • Catalog lookup for countries, services, products, and exchange rates.
  • Balance reads on /v2 and /v1.
  • Order create, list, get, cancel, finish, resend, and active-order lookup.
  • OTP polling with stale-code protection after resend (afterCode / after_code).
  • Webhook get/update/test plus raw-body signature verification helpers.
  • Typed error classes for validation, auth, rate limit, timeout, terminal order, and money/idempotency failures.

Documentation

Repository Layout

packages/sdk-js/   TypeScript/JavaScript SDK
packages/sdk-py/   Python SDK
docs/              Public API and AI-agent documentation
scripts/           Contract and release verification helpers

License

MIT — see LICENSE.

About

Official SMSCode SDKs and OpenAPI for virtual numbers, receive SMS online, SMS OTP verification, and temporary phone number automation.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors