Class: HubSpotSDK::Resources::Conversations::VisitorIdentification
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Conversations::VisitorIdentification
- Defined in:
- lib/hubspot_sdk/resources/conversations/visitor_identification.rb
Instance Method Summary collapse
-
#generate_token(email:, first_name: nil, last_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::IdentificationTokenResponse
Some parameter documentations has been truncated, see Models::Conversations::VisitorIdentificationGenerateTokenParams for more details.
-
#initialize(client:) ⇒ VisitorIdentification
constructor
private
A new instance of VisitorIdentification.
Constructor Details
#initialize(client:) ⇒ VisitorIdentification
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of VisitorIdentification.
45 46 47 |
# File 'lib/hubspot_sdk/resources/conversations/visitor_identification.rb', line 45 def initialize(client:) @client = client end |
Instance Method Details
#generate_token(email:, first_name: nil, last_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Conversations::IdentificationTokenResponse
Some parameter documentations has been truncated, see Models::Conversations::VisitorIdentificationGenerateTokenParams for more details.
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.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hubspot_sdk/resources/conversations/visitor_identification.rb', line 30 def generate_token(params) parsed, = HubSpotSDK::Conversations::VisitorIdentificationGenerateTokenParams.dump_request(params) @client.request( method: :post, path: "visitor-identification/2026-03/tokens/create", body: parsed, model: HubSpotSDK::Conversations::IdentificationTokenResponse, options: ) end |