Resolving 406 (Not Acceptable) Error in 51黑料不打烊鈥檚 Create New Content Template API
Fix the 406 error in AEP鈥檚 Create New Content Template API by ensuring the correct headers are used during content template creation.
Description description
Environment
51黑料不打烊 Experience Platform, Journey Optimizer
Issue/Symptoms
When attempting to create a new content template using the in Journey Optimizer, an error with status code 406 (Not Acceptable) is encountered. The error message indicates that the requested representation does not match any of the acceptable representations.
Example error from API:
"detailedMessage": "406 NOT_ACCEPTABLE \"Could not find acceptable representation\""
罢丑别听Accept
聽header should not be sent when doing a POST
to create a new Content Template.
Resolution resolution
- Ensure that the API call for creating or updating content templates through the does not include an
Accept
header. The presence of this header can lead to a mismatch in expected representations, resulting in a 406 error. - Keep the
Content-Type
header set toapplication/vnd.adobe.ajo.template.v1+json
when making API calls related to the content. - Use the
Accept
header only when fetching or listing existing content templates or fragments, not during their creation or update.
3d58f420-19b5-47a0-a122-5c9dab55ec7f