MCPInstall

visitor-identification

Generate a HubSpot Conversations visitor identification token for a known website visitor by email, with guidance on required scopes, account tier requirements, and how the frontend must use the token with the HubSpot Conversations SDK.

Installs
184
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/hubspot/agent-cli-skills --skill visitor-identification
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads visitor-identification automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Requires the conversations command group from hub-cli PR #251. hubspot conversations visitor-identification --help is authoritative.

What visitor identification is

When a known contact (someone whose email you have) visits your website, the HubSpot Conversations chat widget can identify them — linking the live chat session to their CRM record. To do this, your server generates a short-lived signed token and passes it to the HubSpot Conversations JavaScript SDK. The SDK sends the token to HubSpot, which verifies it and associates the chat session with the contact.

The token is NOT a general authentication credential. It identifies one visitor for one chat session and is useless outside the Conversations SDK.

Requirements

RequirementDetail
Account tierProfessional or Enterprise
Required scopeconversations.visitor_identification.tokens.create
Token lifetime12 hours; cache across page loads and refresh at least every 12 hours
Generation sideServer-side only — never generate in browser JavaScript; your private app token must remain secret

Generate a token

# Minimal — email only
hubspot conversations visitor-identification create-token \
  --email visitor@example.com

# With name (populates the contact preview in the widget)
hubspot conversations visitor-identification create-token \
  --email visitor@example.com \
  --first-name Jane \
  --last-name Doe

Output:

{"ok":true,"data":{"token":"eyJhbGciOiJIUzI1NiJ9..."}}

If the private app token is missing the required scope the CLI returns a 403 with a scope hint:

{"ok":false,"error":{"status":403,"message":"Missing scope: conversations.visitor_identification.tokens.create"}}

Setting up the private app token

The conversations.visitor_identification.tokens.create scope must be granted on the HubSpot private app whose token is in HUBSPOT_ACCESS_TOKEN. To add the scope:

  1. In HubSpot: Settings → Integrations → Private Apps → [your app] → Scopes
  2. Under "CRM", enable conversations.visitor_identification.tokens.create
  3. Rotate the token if required after scope change

What the frontend must do with the token

After generating the token server-side, set loadImmediately: false before the widget loads. Then set the identification properties and load the widget:

const { token } = await fetch('/api/hs-visitor-token').then(r => r.json());

window.hsConversationsSettings = {
  loadImmediately: false,
  identificationEmail: 'visitor@example.com',
  identificationToken: token,
};

window.HubSpotConversations.widget.load();

Key rules:

  • Generate the token server-side for authenticated users; cache it across page loads only if it is refreshed at least every 12 hours.
  • Do not expose your HUBSPOT_ACCESS_TOKEN (private app token) to the frontend.
  • identificationEmail must match the email used to generate the token.

See HubSpot's public documentation for the full Conversations SDK reference.

Known constraints

  • Requires Professional or Enterprise HubSpot subscription. On Starter or Free the API returns a 403.
  • One token per email address per call. Bulk generation is not supported.
  • The token payload is opaque — do not attempt to decode or store it beyond passing it to the SDK.

FAQ

What does the visitor-identification skill do?

Generate a HubSpot Conversations visitor identification token for a known website visitor by email, with guidance on required scopes, account tier requirements, and how the frontend must use the token with the HubSpot Conversations SDK.

How do I install visitor-identification?

Run npx skills add https://github.com/hubspot/agent-cli-skills --skill visitor-identification in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/visitor-identification/ (personal) or .claude/skills/visitor-identification/ (project).

Which AI agents can use visitor-identification?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is visitor-identification safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains visitor-identification?

It is published by hubspot in hubspot/agent-cli-skills. It has 184 recorded installs.

More from hubspot/agent-cli-skills

View all →

ticket-resolution

hubspot/agent-cli-skills

Create, triage, advance, and close HubSpot support tickets — pipeline discovery, contact/company association, priority queues, bulk stage moves, resolution close-out.

2K installs

crm-lookup

hubspot/agent-cli-skills

Find a specific CRM record by ID, email, domain, or name fragment, and traverse associations for the full account picture.

Business & Finance1.8K installs

bulk-operations

hubspot/agent-cli-skills

Foundation patterns for the hubspot CLI — JSONL piping, batch read, pagination, dry-run/digest/confirm for destructive ops, and hubspot history for recovery. Every other skill builds on this one.

1.8K installs

crm-data-quality

hubspot/agent-cli-skills

Find incomplete records, normalize field values in bulk, dedupe with hubspot objects merge, and audit custom properties. Builds on bulk-operations for JSONL piping and dry-run/digest/confirm.

Business & Finance1.8K installs

workflow-automation

hubspot/agent-cli-skills

List, inspect, create, update, and delete HubSpot workflows (v4 flows API) from the hubspot agent CLI, not the hs developer CLI. Classic v3 contact-based workflows are not covered.

deal-management

hubspot/agent-cli-skills

Run the full deal lifecycle from CLI — discover pipelines/stages, qualify MQLs into deals with associations, advance/reassign in bulk, hunt stalled deals, and close.

1.7K installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs