APIs & Integrations

btoskov
Member

Geting a contact by its user token for already exisitng contact doesn't return the contact.

Hi,

 
We have an issue with particular contact in HubSpot with which we perform tests.
In our site we have integrated our forms to send data to HubSpot when they are submitted and then we retrieve the HubSpot Contact by its user token to get his data.
 
We isolated the steps which are the following:
 
1. We are opening a new incognito browser and navigating to the page where our form is. When a new browser is opened a new hubspotutk cookie is generated.

2. We want to associated this hubspotutk cookie with a contact which already exist in HubSpot. For this to happend we submit the form with our test email which already exist in HubSpot as a Contact.
 
3. After the submission we are trying to get our test contact by the hubspotutk cookie  but as a result it doesn't return the contact only returns this JSON with 5 properties. We expect that this cookie will be associated with the existing contact in HubSpot.

 

 

 

 

{
    "vid": ,
    "canonical-vid": ,
    "merged-vids": [],
    "portal-id": ,
    "is-contact": false,
    "profile-token": ",
    "profile-url": "",
    "properties": {
        "hs_is_contact": {
            "value": "false",
            "versions": [
                {
                    "value": "false",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        },
        "num_conversion_events": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        },
        "num_unique_conversion_events": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        },
        "hs_object_id": {
            "value": "454901",
            "versions": [
                {
                    "value": "454901",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        },
        "hs_all_contact_vids": {
            "value": "454901",
            "versions": [
                {
                    "value": "454901",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        }
    },
    "form-submissions": [],
    "list-memberships": [],
    "identity-profiles": [
        {
            "vid": 454901,
            "saved-at-timestamp": 1606388510278,
            "deleted-changed-timestamp": 0,
            "identities": []
        }
    ],
    "merge-audits": []
}

 

 

 

 

This problem appeared recently and we noticed it when our tests started to fall. 

Is there any way this email to be blocked because it is used constantly or something else is happening. We try with other existing contacts in HubSpot we couldn't reproduce the problem with them, only with the test one.

 

Thanks in advance! 

0 Upvotes
2 Replies 2
btoskov
Member

Geting a contact by its user token for already exisitng contact doesn't return the contact.

Hi, MichaelC

 

Thanks for the fast response.

 

Yes we try to fill the form from another ip address and the same thing happend.

We will check the option you give us but we want to find where is the problem and why this test email we use behaves this way.

Regards,
Boris

0 Upvotes
MichaelC
Guide | Partner
Guide | Partner

Geting a contact by its user token for already exisitng contact doesn't return the contact.

I have noticed that it may also relate to the ip adress being used to fill the form. Do you have the same problem when reaching that same form from an other ip adress?

Secondary you can create your own contact property (named usercookie for description purpose). Then you can search your contacts using API where you search all contacts with the property usercookie x. You can then return any contact property such as user email or user id and pretty much do anything from there with the contacts api. Look at the API documentation for more info or reply for further help.

https://developers.hubspot.com/docs/api/crm/contacts

Endpoints > Search > Filter sort search


Need further help with integrations or business development?



Want to help me?

Go to the following links and read through the ideas. If you like them - give the idea an upvote

Upvote the following ideas: