Getting the API to work : Pull a specific property from contacts




for our client Evalueserve, we want to do the following:

We have created several landing pages for the client and due the lack of features of Hubspot/Hubspot Workflows and forms, we cannot distinguish if a contact already have performed a DOI or not.

What we want to do:
So we want to establish a gate between the form which then sends the visitor to the correct page (either to the 2nd stage where they need to perform the DOI, or if they have performed a DOI redirect them directly to the download's page).

How we think we can achieve this:
Using your API and pulling the respective property like "doi_status". We can then get two states from it: pending or confirmed.

The Problem:
If I was using the HAPIKey from our developers account, it told me that we have not the necessary rights. But that's not correct.

Then we stumbled upon this page:

This helped us, we've successfully created a testing account, but now with this key it just shows 2 contacts, which is not correct either. All the accounts look interconnected to the correct main account.

This is urgent, as the client cannot proceed with their landing page campaign without this API gate in place.

Florian / publicorange


Hi @publicorange,

Just to make sure that we're on the same page, you're using the hapikey you got from the test portal, correct? Each hapikey corresponds to a single portal; it will only allow access to that specific portal. If you're making requests to a test portal, you need to use that portal's hapikey. If you then want to start making requests to your production portal, you'll need to start using your production portal's hapikey.

Does that help? For reference, I've included a Knowledge Base article on getting a portal's hapikey: