APIs & Integrations

Manno
Member

Unknown Contacts Search API failure: [400] User xxx does not have permissions on portal xxx

The company I work for has created a custom app for one of our customers and in the app it's not possible anymore to call the /contacts/v1/search/query endpoint.

 

Each time we receive a 400 error response with the following message: 

"Unknown Contacts Search API failure: [400] {\"status\":\"error\",\"message\":\"User xxx does not have permissions on portal xxx\",}".
 
Reading the error message it seems that the user that is linked to the oauth2 token that we use does not have access to the portal anymore that we try to query.
 
However if I call the /contacts/v1/lists/all/contacts/all endpoint with the same oauth2 token I get a 200 response.
 
Both the /contacts/v1/search/query and the /contacts/v1/lists/all/contacts/all endpoints require the 'crm.objects.contacts.read' scope so I find it really weird that one endpoint always gives errors and the other one doesn't.
 
Our customer says that the account that they used to create the oauth2 connection has full access to the portal. 
 
We also have asked our customer to redo the oauth2 connection but that didn't solve the issue.
 
Does anybody have an idea what the problem could be?
0 Upvotes
3 Replies 3
dennisedson
HubSpot Product Team
HubSpot Product Team

Unknown Contacts Search API failure: [400] User xxx does not have permissions on portal xxx

@himanshurauthan ,  any chance you have experienced this before?

@Manno , have you tried the newer search?  Also, is your app updated for granular scopes?

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
Manno
Member

Unknown Contacts Search API failure: [400] User xxx does not have permissions on portal xxx

Hi Dennis, I have tried the to call the v3 search endpoint with the oauth token of our customer and I can call that endpoint without any problems.

 

However it seems that alot of data is not returned which I do  receive when I successfully call the v1 search endpoint.

 

For example the form submisions that were done for the contact are not returned. Our custom app needs that data for some checks that it does.

 

It doesn't seem that switching to that endpoint would be a good solution for us.

 

I have also verified that the custom app has the granular scope 'crm.objects.contacts.read' applied and not the general scope 'contacts'.

 

Is it maybe possible for you to check that the user that is bound to the oauth2 token that we use, does have all the necessary permissions for the portal that we interact with?

0 Upvotes
Manno
Member

Unknown Contacts Search API failure: [400] User xxx does not have permissions on portal xxx

@dennisedson can it be verified that the user that authenticated via oauth2 has the correct permissions for the portal that we try to access?


We would really like to resolve the issue that we have with the custom app we built and we don't have any other idea what the problem could be.

0 Upvotes