Skip to content

Identify users

When you identify a signed-in user, the bot can greet them by name, answer account-specific questions through Actions, and attach the conversation, leads and issues to that user.

Available on Starter and higher.

Open Bot → Settings → Identity verification and copy the secret. Keep it on your server. Never put it in client-side code.

The hash is HMAC-SHA256(identitySecret, userId) as a hex string. If you don’t have a user id, use the email.

Node.js / Next.js server
import { createHmac } from "node:crypto";
export function feedbotHash(userId: string) {
return createHmac("sha256", process.env.FEEDBOT_IDENTITY_SECRET!).update(userId).digest("hex");
}
Python
import hmac, hashlib, os
def feedbot_hash(user_id: str) -> str:
return hmac.new(os.environ["FEEDBOT_IDENTITY_SECRET"].encode(), user_id.encode(), hashlib.sha256).hexdigest()
PHP
$hash = hash_hmac('sha256', $userId, getenv('FEEDBOT_IDENTITY_SECRET'));
<script src="https://w.feedbotai.com/v1/feedbot.js" data-bot-id="YOUR_BOT_ID" async></script>
<script>
window.Feedbot = window.Feedbot || function () { (Feedbot.q = Feedbot.q || []).push(arguments) };
Feedbot("identify", {
userId: "u_123",
email: "ann@example.com",
name: "Ann",
hash: "HASH_FROM_YOUR_SERVER",
metadata: { plan: "pro", signedUpAt: "2026-05-01" },
});
</script>

Commands are queued, so you can call Feedbot(...) before the loader has finished loading.

app/feedbot-identify.tsx
"use client";
import { useEffect } from "react";
type Props = { userId: string; email: string; name: string; hash: string };
export function FeedbotIdentify(props: Props) {
useEffect(() => {
const w = window as any;
w.Feedbot = w.Feedbot || function (...args: unknown[]) { (w.Feedbot.q = w.Feedbot.q || []).push(args); };
w.Feedbot("identify", props);
}, [props.userId]);
return null;
}

Render it from a server component that computes hash with feedbotHash(user.id).

Feedbot("reset");

This forgets the visitor and the current conversation on this device.

Identity sent without a valid hash is still stored, but marked as unverified. The bot won’t pass unverified identity to your Actions.