Skip to content

User IDs

Pass your normal account ID as userId. It never reaches us in clear: the SDK sends "h1:" + SHA-256(publishable key + ":" + userId), and the API stores only "u_" + HMAC-SHA256(customer key, that hash), where the customer key is derived from a server secret that is not kept with the data. The same person always gets the same stored ID under your key, on every device, so their history builds up; under another customer's key the same ID maps to something unrelated.

Risk objects and webhooks carry the stored ID as user_id (u_…). Server calls (GET /users/{id}/…, DELETE /users/{id}) accept either your raw ID, which the API hashes the same way and does not store, or that u_… value; responses include it as user_ref. Older SDKs that send the raw ID are mapped to the same stored ID.