Wednesday, October 9, 2024

Error Exporting to Adobe Target: Create offer request failed! API request failed

We encountered the following error while trying to export Experience Fragments from AEM to the Adobe Target Offer Library, despite completing all the integration steps:

Error:
Error Exporting to Adobe Target: Create offer request failed! API request failed.



09.10.2024 15:18:17.031 *WARN* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] org.apache.sling.engine.impl.request.RequestData RequestProgressTracker not found in request attributes

09.10.2024 15:18:17.035 *INFO* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] com.day.cq.wcm.core.impl.designer.SearchPathLimiter Search path limiter configured with searchPathLimiterFeatureToggleOn: true and searchPathThreshold: true. 

09.10.2024 15:18:17.121 *INFO* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] com.day.cq.analytics.testandtarget.impl.serializer.SaveOfferRequestRestAdapterFactory The Adobe Target offer does not contain JSON.

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $

at com.google.gson.JsonParser.parseReader(JsonParser.java:66) [com.google.gson:2.8.9]

at com.google.gson.JsonParser.parseString(JsonParser.java:47) [com.google.gson:2.8.9]

at com.google.gson.JsonParser.parse(JsonParser.java:98) [com.google.gson:2.8.9]


09.10.2024 15:18:17.766 *ERROR* [[0:0:0:0:0:0:0:1] [1728505097029] POST /libs/cq/experience-fragments/content/commons/targetexporter.html HTTP/1.1] com.adobe.cq.xf.impl.adobetarget.exporter.AbstractExperienceFragmentExporter Create offer request failed!__API request failed

com.day.cq.analytics.testandtarget.TestandtargetException: Create offer request failed!

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.create(RestApiAdapter.java:122) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.createOffer(RestApiAdapter.java:101) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.TestandtargetServiceImpl.createHTMLOffer(TestandtargetServiceImpl.java:65) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.TestandtargetCampaignMediatorImpl.syncOffer(TestandtargetCampaignMediatorImpl.java:539) 


Caused by: com.day.cq.analytics.testandtarget.impl.service.WebServiceException: API request failed

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.request(WebServiceImpl.java:646) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.request(WebServiceImpl.java:600) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.service.WebServiceImpl.createOffer(WebServiceImpl.java:268) [com.adobe.cq.cq-target-integration:1.4.56]

at com.day.cq.analytics.testandtarget.impl.RestApiAdapter.create(RestApiAdapter.java:116) [com.adobe.cq.cq-target-integration:1.4.56]

... 193 common frames omitted

Caused by: com.day.cq.analytics.testandtarget.impl.service.WebServiceException: Unexpected response status code [403] for request [https://mc.adobe.io/tenant/target/offers/content?includeMarketingCloudMetadata=true]._{"httpStatus":403,"requestId":"sfdsffgsffsf","requestTime":"2024-10-09T20:18:17.696894302Z","errors":[{"errorCode":"Forbidden.Resource","message":"Access denied. To perform this operation, all of the following privileges are required \"[editor]\".","meta":{}}]}

The actual issue is that the API credentials enabled through the Developer Console project are set to Observer access by default for the selected workspace. However, to successfully export the offer into Adobe Target, a minimum of Editor or Approver access is required.



The issue can be resolved by changing the product role to Editor or Approver through the Admin Console for the corresponding Adobe Target Product Profile (Workspace).

Once the product role is updated to Editor or Approver in the Admin Console for the corresponding Adobe Target Product Profile (Workspace), the export will be successful.



No comments:

Post a Comment