Issue while using removeInjectabletag function

Please help to resolve below error.

{“level”:“ERROR”,“detail”:{“status”:500,“message”:“Oops! Something went wrong. Please try later”,“code”:“CX-1”,“exception”:“”,“request_id”:“”,“stack_trace”:“”,“meta”:{}},“request”:{“method”:“put”,“url”:“/service/platform/content/v1.0/company/270/application/6530e02a881d152ecca8f8f3/tags/remove/handpicked”,“headers”:{“Accept”:“application/json, text/plain, /”,“Content-Type”:“application/json”,“Authorization”:“Bearer oa-e727de528d999c3d524e296fdb468cfbf179b5a3”,“x-ext-lib-version”:“js/0.5.4”,“x-fp-sdk-version”:“1.3.9”,“x-fp-date”:“20231227T054314Z”,“x-fp-signature”:“v1.1:577ea32974bea36c1d49c7fcaa213f3d2cff3944328b93ed87096053cd9fa387”,“User-Agent”:“axios/0.27.2”,“Content-Length”:117}},“time”:“Wed Dec 27 2023 11:13:15 GMT+0530 (India Standard Time)”,“version”:“1.3.9”}
Logger.js:58

FDKServerResponseError: Oops! Something went wrong. Please try later at /Users/mayank.sachan/Documents/Work/JioPush/Fynd/code/node_modules/fdk-client-javascript/sdk/common/AxiosHelper.js:145:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Content.removeInjectableTag (/Users/mayank.sachan/Documents/Work/JioPush/Fynd/code/node_modules/fdk-client-javascript/sdk/platform/Content/ContentPlatformApplicationClient.js:4369:22) at async view (/Users/mayank.sachan/Documents/Work/JioPush/Fynd/code/app/routes/script.router.js:127:9)

Parameter passed in function:

tags created while extension installation:

{
“name”: “JioAds Bindings”,
“sub_type”: “external”,
“type”: “js”,
“position”: “body-bottom”,
“url”: “”,
“attributes”: {
“id”: JioAdsBinding_${application_id}
}
},
{
“name”: “Jio Ads Fynd Extension css”,
“sub_type”: “external”,
“type”: “css”,
“position”: “head”,
“url”: <URL>,
“attributes”: {
}
},
{
“name”: “JioAds SDK”,
“sub_type”: “external”,
“type”: “js”,
“position”: “head”,
“url”: <URL>,
“attributes”: {
“id”: JioAds_${application_id}
}
},
{
“name”: “JioAds AppV6”,
“sub_type”: “external”,
“type”: “js”,
“position”: “head”,
“url”: <URL>,
“attributes”: {
“id”: JioAdsV6_${application_id}
}
},
{
“name”: “JioAds swiper”,
“sub_type”: “external”,
“type”: “js”,
“position”: “head”,
“url”: <URL>,
“attributes”: {
“id”: JioAdsSwiper_${application_id}
}
},
{
“name”: “JioAds jquery”,
“sub_type”: “external”,
“type”: “js”,
“position”: “head”,
“url”: <URL>,
“attributes”: {
“id”: JioAdsjquery_${application_id}
}
}

Companyid : 270
cluster : sngz0
sales channel: JioAds
app_id : 6530e02a881d152ecca8f8f3

Let me know what else is required. I will provide

Hi @Manky

The removeInjectabletag method expects the tag_id instead of the tag_name. You can obtain the tag_id using the getInjectableTags method and then pass it to the removeInjectabletag method within the tags array.

For example

const response =await platformClient.application(application_id).content.getInjectableTags({
       "all": true
});
await platformClient.application(application_id).content.removeInjectableTag({
            "body": {
                "tags": [response.tags[0]._id,response.tags[1]._id]
            }
        });