Skip to main content

vact-server

Server-only VACT client for Python. No dependencies — standard library only.

New to VACT? Create a free account at vact.online — ₹100 of calling credit to build with, no card required. Full guides and API reference: vact.online/docs.html.

pip install vact-server

Your backend is the only place the App Secret ever lives. It authenticates your own user, then asks VACT for a short-lived token scoped to them.

from vact_server import VactServer

vact = VactServer(
    app_id=os.environ["VACT_APP_ID"],
    app_secret=os.environ["VACT_APP_SECRET"],
)

# After YOUR login has decided who this is:
token = vact.create_access_token(
    user_id=current_user.id,
    allowed_callee_ids=["user_42"],   # optional: restrict who they may call
)
return {"accessToken": token["accessToken"]}

Verifying webhooks

Pass the raw request bytes. Re-serializing parsed JSON changes the bytes and the signature will not match.

from vact_server import verify_vact_webhook, VactServerError

@app.post("/webhooks/vact")
async def webhook(request):
    try:
        event = verify_vact_webhook(
            await request.body(),          # raw bytes, not the parsed dict
            dict(request.headers),
            os.environ["VACT_WEBHOOK_SECRET"],
        )
    except VactServerError:
        return Response(status_code=400)   # never process an unverified body

    # Deduplicate on event["eventId"] — delivery is retried.
    if event["type"] == "incoming_call":
        send_push(event["data"]["toUserId"], event["data"])
    return Response(status_code=200)

Signature verification is timing-safe and rejects deliveries whose timestamp is more than five minutes old, which stops replay.

Deleting a user's data

result = vact.delete_user_data(user_id)   # pages internally until complete

Full documentation: https://vact.online/docs.html

Metadata

Release files for vact-server 1.0.2

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

Source distribution (sdist)

Source distribution for vact-server 1.0.2
File Size Uploaded Provenance Actions
vact_server-1.0.2.tar.gz 7.0 kB Without provenance Details for vact_server-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vact-server 1.0.2
File Interpreter ABI Platform Actions
vact_server-1.0.2-py3-none-any.whl Python 3 none any Details for vact_server-1.0.2-py3-none-any.whl

Total release size: 13.0 kB

Release files / vact_server-1.0.2.tar.gz

Download URL vact_server-1.0.2.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d22c9a2d0736aa3852759f57ff699f4841fcebb1eee04bed7b9636742c25d7c4
BLAKE2b-256 checksum
How to use checksums
ad400b4b9a5807f386e38a3e3723f3a90eb1430d69bd291a4e2a5bf7dc6cdb53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / vact_server-1.0.2-py3-none-any.whl

Download URL vact_server-1.0.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e0c7504aef355d1a82b6a53ff04c20ea5e214fa22b9ffe296e08fd2af692126
BLAKE2b-256 checksum
How to use checksums
541af5d27d4187ccbd854dd09fd7155434e4dea7f2ab78602a6552a31ade6f04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Security for vact-server 1.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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