Error Message From Improper Permissions (Company List Request)

companies

#1

When I try to use the Get All Companies (https://developers.hubspot.com/docs/methods/companies/get-all-companies) API

I get an error:

{
“status”: “error”,
“message”: “This hapikey (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) does not have proper permissions! (requires any of [contacts-read])”,
“correlationId”: “…”,
“requestId”: “…”
}

Please tell me what I am doing wrong.


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

Hi @artiebha

Are you using the Developer HAPIkey from the developer portal for this? That key can only be used to set up things like the Webhooks or Timeline APIs. You’d need to create a test portal then get the API key for that portal for any testing you want to do.

If you’re not using the Developer HAPIkey, you’ll need to make sure that the CRM is enabled for the portal you’re working with:
https://knowledge.hubspot.com/articles/kcs_article/hubspot-crm/what-settings-do-i-need-to-enable-in-the-marketing-product-to-get-started-with-hubspot-crm


#3

I signed up for a developer account yesterday. I started implementing Hubspot a couple of weeks ago for my company. Right now we are just using the free CRM portion of the product. We don’t have the Marketing component. The article you shared with me requires the marketing piece I believe. Is there no way to get the Hubspot Company IDs?


#4

If you’re using the free CRM tools, then you should already have access to the Companies API, but you would still need to get the API key from your CRM portal and not the key from the developer account.


#5

Thanks for the information. It’s working now!