APIs & Integrations

handybry
Member

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hello,

 

 We are using HubSpot API,  /deals/v1/deal/recent/modified endpoint but when we do API call it returns 400 Bad Request:

User <userId> does not have permissions on portal <portalId>

 

What do I need to do to fix this? Do I need to re-authorize using oauth the user?

 

Regards,

Bry

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hey @handybry 

 

This error is indeed related to the user no longer having permissions to access this portal. This is usually related to the integrating user being deleted or having permissions changed.

 

Having another active Super Admin disconnect and reconnect the integration should resolve the immediate permissions issue.

 

I hope this helps!

Product Manager @ HubSpot

View solution in original post

0 Upvotes
6 Replies 6
Willson
Solution
HubSpot Employee
HubSpot Employee

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hey @handybry 

 

This error is indeed related to the user no longer having permissions to access this portal. This is usually related to the integrating user being deleted or having permissions changed.

 

Having another active Super Admin disconnect and reconnect the integration should resolve the immediate permissions issue.

 

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
handybry
Member

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hey @Willson 

 

Thanks for your reply! I just realized, Why `recent deals` is not working but `all deals` works? Any Idea why?

 

Regards,

Bry

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hey @handybry 

 

Would you be able to elaborate on this one for me? Could you perhaps provide examples of the request URL and body (if any) you're using with this request? Thanks

 

Product Manager @ HubSpot
0 Upvotes
handybry
Member

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hey @Willson 

 

We call 2 endpoints.

1. Get Recent Deals

2. Get All Deals

 

 

For recent deals:
HTTP Method: Get

HTTP URL:  /deals/v1/deal/recent/modified

For getting all deals:

HTTP Method: Get

HTTP URL:  /deals/v1/deal/paged

 

The request headers above are

Authorization  - Bearer <token>

 

When requesting for recent deals it returns 400 bad request (

Unknown Contacts Search API failure - User does not have permissions on portal

 

Let me know if you need more info! Thank you!

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hey @handybry 

 

Thanks for providing this! I am currently unable to replicate this at the moment, would you be able to provide the Dev Portal Id and App Id for the integration that is being used? 

If you could also provide the Portal Id where this integration is currently installed, I can take a look into this too. 

 

If you'd rather, feel free to DM me with these details, thanks!

Product Manager @ HubSpot
0 Upvotes
AMoreau
Member

Unknown Contacts Search API failure [400] - Recent Deals

SOLVE

Hey @Willson,

I am facing the exact same issue on `company` resource.
For some of my customers, a call to `/companies/v2/companies/recent/modified` returns `Unknown Contacts Search API failure [400]`, `User XXX does not have permissions on portal XXX`
But calling `/companies/v2/companies/paged` with the same credentials returns a 200 and the data.

Is there any rational that could explain that ?

 

Thanks for your help !

0 Upvotes