Identity Verification (Secure User Login)
Choosing the identity value
1. Generate the channel's identity secret
curl -X POST "https://apigw.klinkcx.com/api/v1/webchat/channels/<channelId>/identity-verification/secret" \
-H "Authorization: Bearer kpt_xxxxxxxx"
# => { "requestId": "…", "secret": "9f2c4a…64 hex chars…" }2. Compute userHash on your server
const crypto = require("crypto");
const userHash = crypto
.createHmac("sha256", process.env.KLINK_IDENTITY_SECRET)
.update(identity) // e.g. user.id — or user.email if that's your identity
.digest("hex");