I have been trying to connect python to my org confluence server which is SSO enabled.
I have used the below python script but getting 401 error. However when I tried the same for personal account with no SSO enable it worked. I generated the PAT within confluence settings.
I wonder if you need to authenticate to Confluence cloud slightly differently:
from atlassian.confluence import ConfluenceCloud
confluence_cloud = ConfluenceCloud(
url="https://your-domain.atlassian.net",
token="your-api-token"
)
...as opposed to using the username and password parameters, which is what we used back in the server/datacenter days.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.