Hello,
Can anyone help me understand how to configure the X-Atlassian-Token to manage page watches?
The reference docs don’t go into the details of how to do it → Remove watch
The function I use is this:
const response = await api
.asUser()
.requestConfluence(route`/wiki/rest/api/user/watch/content/${page}`, {
method: "DELETE",
headers: {
Accept: "application/json",
"X-Atlassian-Token": "no-check",
},
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
In this case I still get an error
[NEEDS_AUTHENTICATION_ERR: Authentication required] {
serviceKey: 'atlassian-token-service-key',
status: 401
}
Instead if I use “asApp” although I get a 204 answer nothing changes in the page watch.
Thanks!