Unable to Access for Confluence via Sphinx Documentation

Jayden
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 7, 2024
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('../ahml_pyspark'))

import os
import os.path as op
import sys

HERE = op.dirname(op.abspath(__file__))
LIB_PKG_PATH = op.abspath(op.join(HERE, "..", ".."))
sys.path.insert(0, LIB_PKG_PATH)
# NOTE: This is needed for jupyter-sphinx to be able to build docs
os.environ["PYTHONPATH"] = ":".join(
    (LIB_PKG_PATH, os.environ.get("PYTHONPATH", ""))
)


# -- Project information -----------------------------------------------------

project = "ahml"
copyright = "2023, Amplify Health"
author = "Amplify Health"

# The full version, including alpha/beta/rc tags
release = "1.0"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    "sphinx.ext.napoleon",
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx_rtd_theme",
    "sphinx.ext.todo",
    "sphinx.ext.extlinks",
    "sphinx.ext.intersphinx",
    "sphinx.ext.ifconfig",
    "sphinx.ext.viewcode",
    "sphinx.ext.githubpages",
    "sphinxcontrib.confluencebuilder",
]

confluence_publish = True
confluence_space_key = "AHAI"
confluence_server_url = cxxx
confluence_server_user = xxxx
confluence_server_pass = "xxxx "

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
    'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
    'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
    'preamble': '',
# Latex figure (float) alignment
    'figure_align': 'htbp',
}

The error: Permission denied on Confluence (rest-call)
Code: 403

 

 

1 answer

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2024

HI @Jayden 

Welcome to the community.

Your issues is you don't have permissions, as seen in the log provided.

You can't access Confluence on the cloud via the web call (API) with plain username and password.

You need to use an API key.

See "confluence_publish_token"  at https://sphinxcontrib-confluencebuilder.readthedocs.io/en/stable/configuration/ 

API token documentation Atlassian:

https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/ 

https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events