I need to access a Confluence page via python script, but although I found some examples online, I wasn't able to do it.
Here are a few attempts:
import requests
urllogin = 'https://myorg/confluence/display/path/to/page'
login = requests.get(urllogin, auth=('myusername', 'mytoken'))
print(login.status_code)
from atlassian import Confluence
confluence = Confluence(
url='https://myorg/confluence/display/path/to/page',
username='myusername',
password='mytoken')
It doesn't seem to be a token issue: I tried using an Atlassian API token https://id.atlassian.com/manage-profile/security/api-tokens or Google API token (my org uses Google credentials to access Confluence as well). Using login credentials didn't work either.