Permissions problem while getContentProperty?

I tried to update the forge/api and forge/ui to current versions for some sample apps.
So I did it also for the “Forge dictionary

After forge deploy and forge install --upgrade I noticed that the app can’t read / update properties.

I had a closer look at the statement

    .requestConfluence(`/rest/api/content/${contentId}/property/${key}` ...

Log statements showed me here: res:{"headers":{},"ok":false,"status":403,"statusText":"Forbidden"}

So it seems to be a permission problem.

The manifest now contains the section:

    - 'read:me'
    - 'read:confluence-content.summary'
    - 'write:confluence-content'

Any idea how to fix this?

P.S. The api & ui versions are:

  "@forge/api": "^0.6.1",
    "@forge/ui": "^0.8.1"

Hmm, we updated forge/api and forge/ui recently as well, and I just noticed a problem writing space properties, though reading works fine.

Note that we do not use requestConfluence() for this, but rather the Properties API onConfluenceSpace() methods!

As for permissions, we had to add the property specific ones:

    - 'read:confluence-props'
    - 'write:confluence-props'

So a good chance that you might just need to add those, but as said, writing currently fails for me (silently, i.e. the call goes through without exceptions, and I can’t log the response when using the properties API) :thinking:


Hey @hopel and @FranzBinder!

I’ll get someone in the team to look into this today. Thanks for reaching out :slight_smile:


Thanks @hopel,
this was oviously the reason.

@danielwinterw, your team mate can stop investigating here :slight_smile:
For me it wasn’t clear if/which permission statement inside the manifest needed to be adjusted.
Maybe the forge deploy command could be enhanced to show some hints.
(Btw: the documentation shows response 404, not 403 )

1 Like

@FranzBinder - glad it works for you now :slight_smile:

To clarify for my own sub-problem of space property writes failing silently: Do you write space properties as well?

@hopel, this sample app uses only REST API call to get/set page properties.
So it seems the confluence:props permission will be needed in all these cases.