Installation¶
vk-mini-app-auth supports Python 3.10 and newer. The runtime package has no external dependencies.
Install the package¶
Prepare a project environment¶
For a new project, create and activate a virtual environment first:
mkdir vk-mini-app-backend
cd vk-mini-app-backend
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
On Windows PowerShell, activate the environment with:
Configure VK credentials¶
Your backend needs two values from VK app settings:
VK_APP_ID: the numeric application ID.VK_SECRET_TOKEN: the secure key used to validate launch parameter signatures.
Store them outside source control:
Never expose the secure key
The secure key belongs on the backend only. Do not send it to the mini app frontend and do not commit it to the repository.
Verify the installation¶
python - <<'PY'
from vk_miniapp_auth import VKMiniAppAuthenticator
authenticator = VKMiniAppAuthenticator(53377165, "secure-key")
print(type(authenticator).__name__)
PY
You should see:
Continue with the quickstart.