POST
/
visitor-identification
/
v3
/
tokens
/
create
Generate a token
curl --request POST \
  --url https://api.hubapi.com/visitor-identification/v3/tokens/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "visitor-email@example.com",
  "firstName": "Gob",
  "lastName": "Bluth"
}'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
Produtos suportados
Requer um dos seguintes produtos ou superior.
Marketing HubMarketing HubProfessional
Sales HubSales HubProfessional
Service HubService HubProfessional
Content HubContent HubProfessional

Escopos Necessários

Esta API requer um dos seguintes escopos:
  • conversations.visitor_identification.tokens.create

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Information used to generate a token

email
string
required

O e-mail do visitante que você deseja identificar

Example:

"visitor-email@example.com"

firstName
string

O nome do visitante que você deseja identificar. Esse valor somente será definido no HubSpot para contatos novos e existentes cujo nome seja desconhecido. Opcional.

Example:

"Gob"

lastName
string

O sobrenome do visitante que você deseja identificar. Esse valor somente será definido no HubSpot para contatos novos e existentes cujo sobrenome seja desconhecido. Opcional.

Example:

"Bluth"

Response

successful operation

The identification token to be passed to the Conversations JS API to identify the visitor

token
string
required
Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"