Skip to main content

Official Telvri Security SDK for SIM-swap and mobile identity checks.

Project description

telvri-security

Official Python SDK for the Telvri Security API — real-time SIM-swap and mobile identity risk checks for login recovery, payouts, and wallet protection.

Install

pip install telvri-security

Requires Python 3.9+.

Quick start — SIM-swap check

Run a SIM-swap risk check before a sensitive action. Authenticate with your rt_live_ API key.

import os
import telvri_security
from telvri_security.models.check_sim_swap_dto import CheckSimSwapDto
from telvri_security.rest import ApiException

configuration = telvri_security.Configuration(
    host="https://telvrisecurity.vercel.app",
)
configuration.api_key["X-API-Key"] = os.environ["TELVRI_API_KEY"]

with telvri_security.ApiClient(configuration) as api_client:
    api = telvri_security.SIMSwapIntelligenceApi(api_client)

    try:
        result = api.sim_swap_controller_check_sim_swap(
            CheckSimSwapDto(phoneNumber="+2348031234569", maxAgeHours=24),
        )
        print(result)
    except ApiException as error:
        # 400 = invalid request body, 401 = missing/invalid API key
        print(f"SIM-swap check failed: {error}")

The response looks like:

SimSwapResponseDto(
    phone_number="+2348031234569",
    swapped=False,
    last_swapped_at="2026-07-14T16:27:00.000Z",
    provider="MTN Nigeria",
    operator="MTN Nigeria",
)

Use the decision to gate the flow:

if result.swapped:
    ...  # Step up verification or block the action
else:
    ...  # Allow the recovery / payout / withdrawal

Authentication

The API accepts either an API key header or a bearer token.

# Option A: X-API-Key header (recommended)
configuration = telvri_security.Configuration(host="https://telvrisecurity.vercel.app")
configuration.api_key["X-API-Key"] = os.environ["TELVRI_API_KEY"]

# Option B: Authorization: Bearer <KEY>
configuration = telvri_security.Configuration(
    host="https://telvrisecurity.vercel.app",
    access_token=os.environ["TELVRI_API_KEY"],
)

API reference

All URIs are relative to https://telvrisecurity.vercel.app.

Class Method HTTP request Description
SIMSwapIntelligenceApi sim_swap_controller_check_sim_swap POST /v1/security/sim-check Run a real-time SIM-swap risk check
DeveloperAuthApi auth_controller_login POST /auth/login Authenticate a developer account
DeveloperAuthApi auth_controller_signup POST /auth/signup Create a developer account

Models

  • CheckSimSwapDto
  • SimSwapResponseDto
  • LoginDto
  • SignupDto

Full per-method and per-model docs are in the docs/ folder.

Development

This SDK is generated from the Telvri Security OpenAPI contract using OpenAPI Generator. To regenerate from the API project, run npm run sdk:generate in the main repository.

  • API version: 1.0
  • Package version: 1.0.0

License

MIT © Telvri Security. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telvri_security-1.0.1.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

telvri_security-1.0.1-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file telvri_security-1.0.1.tar.gz.

File metadata

  • Download URL: telvri_security-1.0.1.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for telvri_security-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2eb784d0d79c6f5be8a7c90717b2a37c23abfcf4a856604f4fcfbae97f0fedbe
MD5 e601fabe016b3b0ea5f97856c347f8c1
BLAKE2b-256 63507b10a1808da40258fd84bd643525d410a5b45d50b4f0cf81caa6889de319

See more details on using hashes here.

File details

Details for the file telvri_security-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for telvri_security-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5695338f2fbfcc928a238a5d46e0dd725e29762bb5685ea0b0df43116b965d2
MD5 2a898362af8a6ffb0ad7ab47020d293b
BLAKE2b-256 1218e3f3258524acb3a5b707477c64c1dcc93b4abd088299ae7cf2c3aa56c8c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page