Creating legacy public apps and project-based apps is temporarily unavailable for new HubSpot accounts.
Learn more in our Trust Center.
curl --request POST \
--url https://api.hubapi.com/visitor-identification/v3/tokens/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
}
'{
"token": "<string>"
}Generate an identification token for a website visitor who has been authenticated using your own system. An identification token returned from this API can be used to pass information about your already-authenticated visitor to the chat widget, so that it treats the visitor as a known contact. This allows support agents to recognize and assist the visitor more effectively.
curl --request POST \
--url https://api.hubapi.com/visitor-identification/v3/tokens/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
}
'{
"token": "<string>"
}Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
The email of the visitor that you wish to identify
The first name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where first name is unknown. Optional.
The last name of the visitor that you wish to identify. This value will only be set in HubSpot for new contacts and existing contacts where last name is unknown. Optional.
successful operation
An identification token that allows the visitor to be treated as a known contact.
Was this page helpful?