Expand my Community achievements bar.

SOLVED

"Access Denied" when trying to get a Target audience via API although I can list audiences

Avatar

Level 4

Hi Everyone,

 

I configured Target API integration in the dev console and assigned "Approver" Target role to that integration as shown in the screenshot. I also assigned a specific product profile, and included my Target workspace into that profile.

With that integration, I was able to get the list of activities for my workspace, get a specified XT activity, and the list of audiences for the workspace.

However, when I tried to view a specific Target audience that I created in my workspace, I got the error shown below. The audience's source is "Adobe Target", and it belongs to my workspace.

Can anyone suggest how to overcome that error?

{
"httpStatus": 403,
"requestId": "l4yUApF2N6FINilzfS49EP9y5LsR1O1Y",
"requestTime": "2025-03-10T22:01:02.988262667Z",
"errors": [
{
"errorCode": "Forbidden.Resource",
"message": "Access denied. You do not have sufficient privileges in accessible workspaces to perform this operation on SEGMENT with id 3438573.",
"meta": {}
}
]
}

 

Dmytro_Panchenk_0-1741644695935.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi @Dmytro_Panchenk ,

To resolve this, please do set the below Accept header in your API request. 

--header 'Accept: application/vnd.adobe.target.v3+json'

Given different versions of the API may expose different data models, permission checks, or resource handling rules. Without explicitly requesting v3, the default (usually v1 or v2) is used, which i guess does not have access to workspace-scoped audiences.


I tried this on my end and I'm now getting proper response. 

Regards,
Vikas Ohlan
LinkedIn Profile 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

Hi @Dmytro_Panchenk ,

To resolve this, please do set the below Accept header in your API request. 

--header 'Accept: application/vnd.adobe.target.v3+json'

Given different versions of the API may expose different data models, permission checks, or resource handling rules. Without explicitly requesting v3, the default (usually v1 or v2) is used, which i guess does not have access to workspace-scoped audiences.


I tried this on my end and I'm now getting proper response. 

Regards,
Vikas Ohlan
LinkedIn Profile 

Avatar

Level 4

Thank you @VikasOhlan , adding the header helped.