User macro to get a json from a third party server


I’m new in developing user macro in confluence.

I want to develop a user macro where i make requests to a third party server with authentication, and then working on the reponse which is a JSON.

is there methods/examples for that, (ps: i want specifically to use Macro and not ScriptRunner)

Thank you

In case you want to use a user macro you can use JavaScript embedded in script tags. In case you don’t have control over the 3rd party server you will most likely bump into cross-domain issues as the browser does not allow to contact other servers via JS in case they don’t send a specific response.

I hope that helps.

Kind regards