Hello here.
I am posting a message here because we are facing strange behaviour.
Here is the description of our workflow:
- We create a contact through API.
- Then we search if the contact’s company exists through the search API. We base this search on the domain of the contact email or, if it is a free email (eg gmail, yahoo), we search with the company name the contact gave us.
- If there is no company found, we create it.
- Last step, we proceed to an API call to associate the contact with the company.
This process is successful when the contact has a custom domain (eg johndoe@mycompany.io). But we have a USER_DOES_NOT_HAVE_PERMISSION error when the user has a free email (eg. johndoe@gmail.com).
Is there any reason why we cannot associate a user to a company if the user has a free email?
I checked different error messages, and it looks like the one we have is specific to an authorization issue, which is strange since we have the right scope declared, and we can associate contacts under certain conditions.
The scope of our application:
- timeline
- oauth
- crm.objects.contacts.read
- crm.objects.contacts.write
- crm.objects.companies.write
- crm.objects.companies.read
- crm.objects.deals.read
- crm.objects.deals.write
Error:
HTTP status code: 400
One or more associations are invalid “USER_DOES_NOT_HAVE_PERMISSION”:[“User does not have permissions to associate COMPANY XXXXXX with CONTACT XXXXXX”], “category”:“VALIDATION_ERROR”}
Thank you!