I'm working on changes in the API client we are using and recently we've started using get recent engagements endpoint. The main problem is that for about 10% of our customers this endpoint responds with 400 error:
Unknown Contacts Search API failure: [400] {"status":"error","message":"User xxx does not have permissions on portal yyy","correlationId":"zzz"}
At the same time the endpoint responsible for fetching all engagements works as expected.
What could be the problem here? The access tokens were are using have the same scopes. If you wish, I can provide you an example user, portal, and correlation IDs.
Assuming you're using OAuth, I'd guess it's nearly certainly related to the permissions/existence of the HubSpot User who originally installed the app within the given portal.
@IsaacTakushi has covered this in the following related forum threads:
Thank you. Is there any way to check these permissions via API? I would like to do that when someone (re)install the app so I can let them know before the error occurs.