APIs & Integrations

dint
Member

Auth Error when pulling all deals

Hi, I’m interested in pulling all deals from a specific CRM account (I have access to more than one). I created an app and here’s the request being made:

http://api.hubapi.com/deals/v1/deal/paged/?hapikey=xxxxxxx&userId=xxxxx

However I get the follwong error:

u’{“status”:“error”,“message”:“This hapikey (xxxxxxx) does not have proper permissions! (requires any of [contacts-read])”,“correlationId”:“xxxxxx”,“requestId”:“xxxxx”}’

  1. How can I reference a specific CRM account in the request?
  2. How do I grant my app access to the CRM?

Hopw you guys can help :slight_smile:

0 Upvotes
10 Replies 10
3PETE
HubSpot Employee
HubSpot Employee

Auth Error when pulling all deals

@dint Is this a custom app or a hubspot app?

0 Upvotes
dint
Member

Auth Error when pulling all deals

@pmanca its a custom app

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Auth Error when pulling all deals

@dint The hapikey itself should allow you to find the specific HubSpot account. Do you know what version of HubSpot you have? The CRM is free so there shouldn’t be a need to grant access to it. Some of the older portals might not have it by default though.

0 Upvotes
dint
Member

Auth Error when pulling all deals

@pmanca actually that’s the problem it doesn’t seem to work that way and
I’m not able to retrieve the deals.

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Auth Error when pulling all deals

I’m going to DM you, to ask for your portal ID

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Auth Error when pulling all deals

@dint where did you get your hapikey from? In your portal it said one had not been created yet. I just generated one for you and tested it out and I can see the correct response from the HubSpot servers

0 Upvotes
dint
Member

Auth Error when pulling all deals

I created it on the portal, that’s weird…I have a hapikey and used it and
it would give me a response it jsut wouldn’t return deals.

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Auth Error when pulling all deals

@dint where you in a dev portal by any chance? Are you sure it was the same portal as the ID you gave me?

0 Upvotes
dint
Member

Auth Error when pulling all deals

Yeah I just checked and like you said there’s only one id working and it’s
the one you created. I’ll try with this hapi key and let you know if it
worked! I also tried with another one of my accounts and it didn’t work
either. Thank you so much for your help I really appreciate i.t

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Auth Error when pulling all deals

np, let me know if you run into any other challenges.

0 Upvotes