HomeProducts— Affect— PersonaTechnologyDocs— Quick Start— Authentication— Client SDK— Webhooks— ErrorsSandboxSign In
EN · 中文
Documentation

Your keys and secrets

Lynxin uses two kinds of API key plus a webhook signing secret, each with one job. The client key (pk_) goes in your web page or app for the SDK; the server key (sk_) and the signing secret stay on your own servers.

CredentialPrefixWhere it livesWhat it's for
Client keypk_Front-end SDK (browser/app)Required, Behavioral Sensing: upload and submit recordings (upload:presign, signal:write). On by default, Personality Profiling: trigger analysis and check progress (analyze:trigger, status:read). Optional, report reading (result:read:own): off by default, and turning it on asks for confirmation.
Server keysk_Your back-end serverEverything a client key can do, plus fetching reports, reading usage and managing webhooks. Permission to delete uploaded videos is off by default; turn it on in the key's row in the console when you need it.
Webhook signing secretwhsec_Your back-end serverVerify a callback really came from Lynxin (HMAC signature). Not an API key — you generate one per webhook in the console (see Webhooks).

Rules

Base URL. The /v1 endpoints on this page and the SDK pages all sit under https://open.hslingxin.com (background checks have their own base URL — see that page). The smallest call looks like this:

curl -H "X-API-Key: $LYNXIN_SK" https://open.hslingxin.com/v1/limits
# 200 — JSON with rate, burst, concurrency, daily_quota
# 401 — empty body (missing or invalid key); the X-Request-Id response header is still there
  • Keep sk_ only on your own servers — never put it in browser code, a mobile bundle, or a public repo.
  • Usage generated with a client key is charged to your account, and once Personality Profiling is enabled it can also trigger analyses. Treat it as a credential that can incur charges; revoke any key you suspect in the console.
  • Permissions. Client key (pk_): Behavioral Sensing — upload:presign · signal:write (required); Personality Profiling — analyze:trigger · status:read (on by default); report reading — result:read:own (optional, off by default). Server key (sk_): all of the above, plus report:read/list · result:pull · usage:read · webhook:config; upload:delete is off by default.
  • What the extra server-key permissions do: report:read/list reads and lists Lynxin Affect reports; result:pull fetches analysis results by client_ref; usage:read reads usage; webhook:config manages webhooks; upload:delete deletes uploaded videos.
  • Header. Every request carries an X-API-Key header with your pk_ or sk_; the gateway resolves your tenant from the key. Keys are bound to your tenant_id — cross-tenant access returns 404.
  • What a browser can call. In the browser, use only your client key, through the SDK, to upload and submit recordings. A client key calling an account endpoint (keys, balance, limits and so on) or any delete endpoint gets 403. Browser requests can only carry the X-API-Key and Content-Type headers, so headers such as Idempotency-Key can't be sent. Call every server-key-only endpoint, background checks included, from your backend.
  • Where keys come from. When your account is set up, the console issues one client key (pk_) and one server key (sk_). The client key is shown in full; the server key is partly hidden in the list, and you can view the full value again in the console when you need it.

Self-service endpoints (your backend · server key)

These tenant-scoped endpoints are the small set your back end calls directly to manage its account — everything else (collection, analysis, report delivery) is handled by the SDK and webhooks.

EndpointUse
GET /v1/keys · POST /v1/keys · DELETE /v1/keys/{id}Manage keys (usually done in the console).
GET /v1/usage · GET /v1/usage/exportUsage detail (CSV export available).
GET /v1/credits · GET /v1/limitsBalance & rate tier.
GET /v1/webhook · PUT /v1/webhook · POST /v1/webhook/secret · POST /v1/webhook/test · GET /v1/webhook/deliveries · POST /v1/webhook/deliveries/{delivery_id}/resendManage webhooks: read and change the callback settings, rotate the signing secret, send a test event, and view and resend deliveries.
GET /v1/results?client_ref=Fetch analysis results from the last 30 days by client_ref (needs result:pull).
GET /v1/rdp/{session_id}/reportRead the Lynxin Affect report (needs report:read).