but i somehow get errors when trying to do so in any component in my frontend (directly in the macro) (CORS ERROR).
But when executing the call from within the browser (console), I do not receive any errors.
What am i doing wrong and what would be the correct way to execute the jira rest api endpoints from a confluence cloud app (macro) ?
I do have a CONNECT app , no forge!
I would love a minimal working example regarding this.
It doesnt even matter if i have to call it from the front end or back end, i just want to somehow make it work to execute jira rest api calls from my confluence cloud app.
Hi, that’s a CORS error, so you’ll have to do the request on your backend.
Here is an outline of what we did for our plugin.
We created a second app for Jira.
After the Jira app is installed, the users can link a Confluence and a Jira app. The client keys, secrets, base urls are different.
When receiving a request from the Confluence app for Jira data, we proxy the request with the appropriate secret from the linked Jira app installation, using user impersonation.
Alternatively, you can use Basic auth for REST APIs, and have the user provide your app with a valid JIRA API token.
Thanks for your suggestion,
the more user friendly way would be without having to install an additional app so i am going to further try out that first.