[SalesForce] Marketing Cloud API Request “Account/User not authorized for operation”

I've been trying to run this request to create a contact

POST /contacts/v1/contacts HTTP/1.1
Host: DOMAINHERE.rest.marketingcloudapis.com
Content-Type: application/json
Authorization: Bearer ACCESS TOKEN HERE
cache-control: no-cache
{
"contactKey": "example@salesforce.com",
"attributeSets": [{
"name": "Email Addresses",
"items": [{
"values": [{
"name": "Email Address",
"value": "example@salesforce.com"
},
{
"name": "HTML Enabled",
"value": true
}]
}]
}]
}------WebKitFormBoundary7MA4YWxkTrZu0gW--

I checked my permissions and I have API access checked off, I checked the access on the installed package as well and it should be open. My user account is also an API enabled user. This is not to be confused with the "Not Authorized" error code.
This is the exact error message I get:

"Account / User not authorized for operation."

Any idea what is causing this problem?

Best Answer

So the resolution on this issue:

On the token request, user was passing scope, which trumped the scope provided to the Installed Package.

In the future the correct scope should be passed in the token call to complete the downstream call. Or scope should be omitted to default to scope granted to the installed package

Related Topic