Macro export via API shows 'allow access' message when access has already been granted

Our app has a Forge macro which enables the end user to specify some details. We export Confluence pages via API and read these macro details as part of the process. This has been working well until now.

However, every macro instance has started showing the ‘allow access’ message (“For this app to display, you need to allow the app to access Atlassian products on your behalf.”) when exported via API rather than the macro content, even when access has already been granted.

We’ve tried hard refreshes, login/logout and even a clean install of the app on a brand new instance, but the issue persists regardless.

Has anyone else run into this and found a workaround? This is a blocking issue for us - any help or ideas on how to solve the problem would be fantastic. Cheers

As far as we can tell, this is a Forge regression. I’ve raised an ECOHELP ticket for assistance and will report back when we learn more.

For anyone else who runs into something similar, it turns out that the Confluence get content endpoint (/wiki/rest/api/content) needs to be called with asUser(). I had been using a code sample previously copied from the docs that used asApp(). This seems to have changed recently and I didn’t realise.

Kudos to @heinzen for helping me get to the bottom of this.