Skip to main content

numberotp (Python)

The official Python client for the NumberOTP API: real phone numbers for SMS / OTP verification. It has sync and async clients, is fully typed, and supports Python 3.9+.

pip install numberotp

Get an API key at numberotp.com/dashboard/developer and set it as NOTP_API_KEY. Guides: numberotp.com/docs/sdks.

from numberotp import NumberOTP

client = NumberOTP()  # reads NOTP_API_KEY

act = client.activations.create_and_wait(
    service="wa", country="16",
    on_number=lambda n: print("Use this number:", n["phoneNumber"]),
)
print("Code:", act["otp"])

Async

from numberotp import AsyncNumberOTP

async with AsyncNumberOTP() as client:
    n = await client.activations.create(service="tg", country="187")
    act = await client.activations.wait_for_code(n["data"]["id"], timeout=600)

More

client.services.search(q="discord.com")
client.prices.get(service="wa")
client.activations.resend(id) / finish(id) / cancel(id)   # cancel → full refund
for event in client.events.stream():                      # live events, reconnects by itself
    ...
from numberotp import verify_webhook                      # check x-numberotp-signature
client.auth.device_login(lambda c: print(c["user_code"]))  # sign a user in (CLI-style)

Errors and reliability

  • Errors carry .status and a stable .code: InsufficientBalanceError, NotFoundError, ConflictError, ActivationClosedError, WaitTimeoutError and others.
  • Purchases send an Idempotency-Key, so retries never buy twice.
  • Expired access tokens refresh automatically.

Metadata

Release files for numberotp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for numberotp 0.1.1
File Size Uploaded
numberotp-0.1.1.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for numberotp 0.1.1
File Interpreter ABI Platform
numberotp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.4 kB

Release files / numberotp-0.1.1.tar.gz

Download URL numberotp-0.1.1.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
20598c25104f966eb593edb88e54dd7aa6550710df73e37f248e64ad647d9ff8
BLAKE2b-256 checksum
How to use checksums
880bcc578de4f8650a1c010752221703808c3b63c147497bd468e280778a4298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / numberotp-0.1.1-py3-none-any.whl

Download URL numberotp-0.1.1-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83a123924ff1972d04fc58b73e69769e3cb9576eff84613423321bd83916ff78
BLAKE2b-256 checksum
How to use checksums
3b079669be2400e83f8cf6bae68f0834b44e1e24c27fda364f31a221cd9c30c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page