This document defines the client contract used by VibraPilot and future Licora v2 clients. It contains no private server credential.
In Licora Admin → Client Apps, create a stable App ID such as vibrapilot. Create licenses with the same API v2 Client App scope.
The client generates a P-256 key pair on first use and protects the private key with the operating system's secure key/storage facility. Only the PEM public key is submitted to Licora.
POST JSON to /api/v2/activate.php:
{
"license_key": "AAAAAAAA-BBBBBBBB-CCCCCCCC-DDDDDDDD",
"app_id": "vibrapilot",
"app_version": "1.0.6.2",
"device_id": "stable-device-identifier",
"device_public_key": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----\n"
}Required proof headers are X-Licora-Timestamp, X-Licora-Nonce, and X-Licora-Device-Signature. The signature covers the exact raw JSON body SHA-256 and context activate:<app_id>.
On success, securely store the refresh token and access token. The response also returns the registered public-key fingerprint and license expiry. Distribute the server public signing key to the client through a trusted channel and pin it in the client configuration. The client should verify every server-signed access token before accepting its claims; the server signing private key never leaves Licora.
status.php and deactivate.php use a Bearer access token plus device proof. Their JSON body is {}. The proof context is the access token JTI.
refresh.php requires the current refresh token and current app version so the server can enforce the Client App minimum-version policy on every refresh. The request proof context is:
refresh:<sha256(refresh_token)>
On success, discard the old refresh token and persist the newly returned one. Reusing an old refresh token causes the server to revoke its refresh family.
- Do not embed or request a Licora API v1 master/shared key for API v2.
- Never send the device private key.
- Do not parse human
messagetext for program logic; use the stablecodefield. - Use HTTPS and verify the server certificate.
Licora v5.8.1 verifies the Admin → API & Clients → Developer Guide introduced by the v5.8.0 source candidate, which presents this same contract in a compact UI and ships downloadable lifecycle references for the approved Python, PowerShell/CMD, C, C++, C#/.NET, Java, Flutter, React Native, PHP and Node.js targets. The examples sign the exact JSON bytes sent to the API and do not embed a shared API v1 credential.