APIs & Integrations

Amit_Chail
Member

Retrieving emails for known users

Hello,

I’d like to retrieve the email address for the user that is currently on my website. This is a custom form and I’d like to pre-populate their email if they have previously filled in a form and are currently a contact in my HubSpot account. This is currently working if I use the HubSpot embed code but I for the purpose of this application, I need a custom form field.

I’ve been playing around with HTTP EVENTS API but haven’t been successful.

I have created an event for this and have a events URL.

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Retrieving emails for known users

Hi @Amit_Chail,

The HubSpot form embed uses a visitor’s usertoken to pre-populate the email address and other property info. You would need to make a call to that endpoint as well, though I would recommend using the HubSpot form embed wherever possible:

Get a contact by its user token

GET /contacts/v1/contact/utk/:contact_utk/profile - For a given portal, return information about a single contact by its User Token (hubspotutk)

0 Upvotes