API client for the Identisure REST API. Supports both synchronous and async usage via httpx and Pydantic models.
Documentation: identisure.github.io/api-client-py
Python 3.10 or later.
- BankID SE: auth, sign, phone auth and sign, QR verify, age verification
- BankID NO: auth, backchannel auth, sign, age verification
- Freja eID: auth, backchannel auth, sign, backchannel sign, age verification
- MitID: auth, backchannel auth, sign, age verification
- FTN (Finnish Trust Network): auth, age verification
- Vipps MobilePay: auth, backchannel auth
- Documents: upload and download documents for signing
pip install identisure-clientfrom identisure_client import IdentisureClientBuilder, BankIdSeAuthRequest, PollOptions
with IdentisureClientBuilder("client_id", "client_secret").environment("staging").build() as client:
session = client.bankid_se().auth(BankIdSeAuthRequest())
result = client.bankid_se().wait_for_auth(session.id, PollOptions())
print(result)import asyncio
from identisure_client import IdentisureClientBuilder, BankIdSeAuthRequest, PollOptions
async def main():
async with (
IdentisureClientBuilder("client_id", "client_secret")
.environment("staging")
.build_async() as client
):
session = await client.bankid_se().auth(BankIdSeAuthRequest())
result = await client.bankid_se().wait_for_auth(session.id, PollOptions())
print(result)
asyncio.run(main())Pass the raw request body exactly as received, before parsing it.
from identisure_client import verify_callback_signature
valid = verify_callback_signature(raw_body, headers["X-Signature-SHA256"], hmac_secret)The test fixtures live in a git submodule, so clone with --recurse-submodules (or run git submodule update --init in an existing clone).
git clone --recurse-submodules https://github.com/identisure/api-client-py.gituv sync --extra devjust build
just test
just checkSet the version in pyproject.toml and identisure_client/_client.py and commit. Then push a tag:
git tag v0.1.0
git push origin v0.1.0The release workflow checks that the tag matches the version, runs CI, publishes to PyPI and creates a GitHub release.
C#, Dart, Go, TypeScript/JavaScript, Java/Kotlin, PHP, Ruby, Rust, Swift