I’m just starting to work with the Hubspot API. I have a developer hapikey, but I created 2 test portals. However, when I need to query the contact by email, I get a 404 not found. I only need to specify the email and the hapikey. How does Hubspot know which portal to retrieve the contact from? Using the “demo” key works. I think I’m missing something.
The developer HAPIkey is only used to setup your apps, such as setting up the Timeline or Webhooks APIs. Hapikeys are portal specific, so if you’re working with a test portal you’d need to get the API key for that portal.
Marketing Basic, Professional, and Enterprise customers and portals with a CRM can access the HubSpot API. Learn how to access your HubSpot API key here.