Skip to main content
proofage has a sync and an async client for every endpoint, typed Pydantic models, typed errors, and webhook verification with extras for FastAPI, Django and Flask.

Install

Supported Python versions

A Python version stays supported for 12 months after its upstream end of life.

Configure

Create a verification

AsyncProofAge has the same methods, awaited, for FastAPI, aiogram and other asyncio code:

Read results

Statuses are VerificationStatus members; a status this version does not know arrives as a plain string, so compare with ==:

Receive webhooks

A request that fails verification never reaches your handler: it is answered 401 with the reason. De-duplicate on event.delivery_id, which stays the same on every automatic retry.

Errors and retries

AuthenticationError (401), PaymentRequiredError (402), PermissionDeniedError (403), NotFoundError (404), ValidationError (422), RateLimitError (429), ServerError (5xx) and TransportError (no response) all extend ProofAgeError, which has status_code, code and message. Every attempt is signed with a new X-Timestamp. verifications.create() and webhook_subscriptions.create() send an Idempotency-Key (a new UUID per call, or yours: idempotency_key=) and keep it across their retries. A GET, and the two creates because of their key, are retried on 408, 429, 5xx, timeouts and connection failures; a create is also retried on 409 IDEMPOTENCY_KEY_IN_PROGRESS after Retry-After. Other POST requests are retried only on 429 and when the connection never opened. A request other than a GET answered REPLAYED_REQUEST is signed again and sent once more. These rules are from version 0.14.0; earlier versions sign without a timestamp and do not retry a create on a 5xx. A 429 waits for Retry-After up to 60 seconds; a longer one raises RateLimitError with retry_after set. client.verifications.erase_personal_data(verification_id, reason_code="data_subject_request") erases the verification’s personal data and returns it with its erasure field set; see Data retention and erasure. ErasureReasonCode lists the reason codes. It follows the POST rule: a 409 or 503 with Retry-After is raised, and calling it again is safe. client.workspace.consent() returns the active consent text, and client.verifications.accept_consent, upload_media and submit do the rest of Capture in your own UI.