Confluence python API

I want to use API to get my confluen page ,but i met a lot of error.
my page address is Log in with Atlassian account

and i saw some example show their address have /rest/api/

and i had try use this code as below: username is my account name. password is my login password

# coding=utf-8
from atlassian import Confluence

confluence = Confluence(url=“”, username=“admin”, password=“admin”)

# If you know Space and Title
content1 = confluence.get_page_by_title(space=“CHARTGPT”, title=“Oscillation Detection Spec”)


# If you know page_id of the page
content2 = confluence.get_page_by_id(page_id=98517)


but i can not get this page.

Welcome to the Atlassian developer community @nannan666,

I feel compelled to explain this Python library and the org behind it are not Atlassian. That isn’t built or maintained by Atlassians, so support here would be spotty at best. One of the consequences of being written by external developer is that library conflates Confluence Cloud with Confluence Server. That will make this library a very leaky abstraction.

Those warnings aside, I think the problem is that Confluence Cloud does not support basic authentication with your password. You must use a Cloud API Token. So, even if you are using a Python library to wrap the APIs, you’ll still need to read the underlying API docs like this page on basic auth.