---
name: validakey
description: >-
  Integrate Validakey (vKey) payment-backed access tokens and licence checks.
  Use when the user mentions Validakey, vKey, vKeys, licence tokens, minting or
  validating access tokens, sealed envelopes, Instance ID handshake, or
  validakey-php. Prefer the official PHP client; never hand-roll envelope crypto
  or put the account private key in distributed end-user software.
---

# Validakey

## Quick protocol

1. Fetch and follow **https://dev.validakey.com/llms.txt** (and **https://dev.validakey.com/llms-full.txt** if needed).
2. Install: `composer require validakey/validakey-php`
3. Configure env vars on the integration host:
   - `VALIDAKEY_BASE_URL` = `https://dev.validakey.com/v1`
   - `VALIDAKEY_API_UUID`
   - `VALIDAKEY_USER_APP_ID`
   - optional `VALIDAKEY_SUBJECT`
   - optional `VALIDAKEY_API_PKEY` **only** for account/billing APIs on a server you control
4. Use `Validakey\ValidakeyClient` — `createToken`, `verifyToken`, `renewToken`, `deleteToken`, `rotateInstance`, `forSubject`.
5. Persist Instance ID with `Validakey\Instance\FileInstanceStore` for long-lived apps.
6. Do **not** POST cleartext JSON to `/v1/i|m|v|r|t|p`. Do **not** invent sealing.

## Pasteable checklist for generated apps

- [ ] Composer package installed
- [ ] Env vars set; private key absent from client/mobile builds
- [ ] Mint then validate in a smoke test
- [ ] Instance store path outside web root

## References

- OpenAPI: https://dev.validakey.com/openapi.json (envelope ops marked `x-validakey-sdk-only`)
- Human docs: https://dev.validakey.com/docs/ai/
- Explorer (no live calls): https://dev.validakey.com/explorer/
