Hi,
I need to export a single page to PDF from a script. As far as I understand, the options are:
- Use an external plugin for PDF export (such as Scroll PDF) and its API
- Use the Confluence CLI interface
- Get the URL with a the web browser (e.g. https://.../confluence/spaces/flyingpdf/pdfpageexport.action?pageId=12345678) and use e.g. curl
I would like to use option 3. According to the docs I can use either Basic authentication, which means hardcoding user credentials in a script, or OAuth, which requires a token. I would be happier about OAuth, but from the admin panel it looks like I can generate tokens only for apps/plugins; therefore I must use some user credentials in the scripts, which looks unsafe and cumbersome.
Is there any other way to export a PDF without additional plugins and without using user credentials? Is there any way to generate a token for a script?
Thank you.