Hey guys,
I’m trying to get all space watchers from a forge app using this endpoint, but I always get the response 401 “Unauthorized; scope does not match”.
As there is no required oAuth-scope defined in the docs i tried a few different ones (read:confluence-space.summary, read:confluence-content.summary, read:confluence-content.all, search:confluence, read:confluence-props
) but none of them worked for this endpoint.
Does anybody know what scope I need or how this endpoint works in forge?
Cheers,
Laurin
3 Likes
have you tried:
read:confluence-props
It is the only one left that makes sense, otherwise I am also out of guesses.
Also sometimes uninstalling and redeploy+install helps once you change forge permissions. Sometimes for me it does not really update the permissions and only an uninstall+install-re-authorize helps.
1 Like
thanks for the reply @clueless,
unfortunetly it still doesn’t work even when completly re-installing the app with the new scope.
1 Like
have you tried asUser() and asApp() when doing the request? Maybe if using asUser() the user has no space permissions … but if that does both not work, we will need some Atlassian Staff people to clarify this.
1 Like
tried both but neither of them worked
1 Like
From the Forge code sample:
// This API resource doesn't support Oauth2 (3LO). See alternate authorization methods:
// https://developer.atlassian.com/cloud/confluence/rest/#auth
Unfortunately, there is no valid scope yet. You should leave feedback at: https://developer.atlassian.com/platform/forge/give-feedback/
In the meantime, are you building this app for yourself or for your company? If so, you can put your api token in encrypted variables and use basic auth.
1 Like
Thanks for the answer @rmassaioli.
As we’re making a public app using an access token isn’t an option for us.
1 Like