Skip to main content

verixo

Official Python SDK for the VerifiedCore API.

Install

pip install verixo

Verify: send one-time codes to your own users

Send a code to your user's phone at sign-up, login or 2FA, then check what they typed. VerifiedCore generates, delivers, rate-limits and expires the code.

import os
from verixo import Client, VerixoError

client = Client(os.environ["VC_API_KEY"])

# 1. Send a code
v = client.verify.start("+2348031234567", ip=request_ip)

# 2. Check the code your user typed
r = client.verify.check(user_input, id=v.id)
if r.valid:
    ...  # signed in
else:
    print(f"{r.attempts_remaining} attempts left")

With a vc_test_ key nothing is sent or charged, and the code is always 123456, so you can build your flow end-to-end before going live.

Other calls: client.verify.get(id), client.verify.list(page=, size=), client.verify.settings() and client.verify.update_settings(brand_name=, allowed_countries=, code_length=, ttl_seconds=).

Failures raise a VerixoError whose code says why, e.g. COUNTRY_NOT_ALLOWED, INVALID_NUMBER, RESEND_TOO_SOON or RATE_LIMITED.

Numbers

import os
import verixo

client = verixo.Client(os.environ["VC_API_KEY"])

result = client.numbers.search(
    service_slug="whatsapp",
    country_code="NG",
    min_score=80,
    limit=5,
)

session = client.numbers.purchase(
    service_slug="whatsapp",
    country_code="NG",
)

def handle(push):
    print(f"OTP: {push.otp} in {push.latency_ms}ms")

client.subscribe(session.session_token, handle)

Note: purchase() takes service_slug + country_code, not a specific number_id -- the server picks the best available number by Health Score at purchase time, since a candidate returned by search() may already be gone by the time you'd reference it back.

Polling instead of real-time push

subscribe() runs a background thread holding a persistent WebSocket connection, which isn't always practical (e.g. one-shot scripts, serverless functions). Use sessions.wait_for_otp() instead:

result = client.sessions.wait_for_otp(session.session_token)
if result.status == "DELIVERED":
    print(result.otp_code)

Errors

All non-2xx responses raise verixo.VerixoError with .status, and usually .code/.detail from the API's error body:

from verixo import VerixoError

try:
    client.numbers.purchase(service_slug="whatsapp", country_code="NG")
except VerixoError as err:
    if err.status == 402:
        print("Insufficient wallet balance")

Requirements

Python 3.8+.

Development

python -m venv .venv
.venv/Scripts/activate   # or `source .venv/bin/activate` on macOS/Linux
pip install -e .
python examples/quickstart.py   # requires VC_API_KEY env var, see file header

Release files for verixo 0.5.0

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

Source distribution (sdist)

Source distribution for verixo 0.5.0
File Size Uploaded
verixo-0.5.0.tar.gz 12.1 kB Details

Built distribution (wheel)

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

Total release size: 29.2 kB

Release files / verixo-0.5.0.tar.gz

Download URL verixo-0.5.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3d1d001fc390661042836b4c7b1f11d0a8685e7bba36a21d3a87105ccdc24bae
BLAKE2b-256 checksum
How to use checksums
a2565fcf39452b99f64fdd2bfd3744d9fbaf4c8492bbe184fd85b9433c03b941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / verixo-0.5.0-py3-none-any.whl

Download URL verixo-0.5.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c34db45a3a8c939d9587c43913fab55a40e54b3587f11936fa416a7706a1d7f6
BLAKE2b-256 checksum
How to use checksums
ef399cb8c8f600ae204fd5a51ce0c18558c91ea949d9f242b12b1880be34238e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

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