Hi Team,
I’m developing confluence macro on Forge. I would like to disable some functionality if user have no permission to edit current page. How can I check if user can edit page (for example via rest api)?
Thanks!
Hi Team,
I’m developing confluence macro on Forge. I would like to disable some functionality if user have no permission to edit current page. How can I check if user can edit page (for example via rest api)?
Thanks!
Hello,
I would say the Check content permissions API ? With the operation
parameter set to read
.
Regards
I recently tried to check the user’s Update permissions using this url https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions/#api-wiki-rest-api-content-id-permission-check-post
const requestBody = {
subject: {
type: "user",
identifier: accountId
},
operation: "update"
};
const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/${contentId}/permission/check`,
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(requestBody)
}
);
but I got a 401
INFO 09:32:20.174 53bcbd4c-e971-4403-996e-4e6e6514d3bf Response: Response {
status: 401,
statusText: 'Unauthorized',
headers: Headers {
date: 'Fri, 03 Oct 2025 06:32:21 GMT',
'content-type': 'application/json',
'content-length': '59',
'x-trace-id': 'db5eb9608cd14b02965400ab0c64fdc4',
'x-failure-category': 'FAILURE_CLIENT_SCOPE_CHECK',
'x-frame-options': 'SameOrigin',
At the manifest I had already the scopes":
- read:content.permission:confluence
- read:confluence-content.permission
And also this url did not work for me in forge https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-restrictions/#api-wiki-rest-api-content-id-restriction-byoperation-operationkey-user-get