Open chlamprecht opened 2 years ago
Hi! I use personal token as password parameter: and it works well for Confluence.
could you share exact logs please?
Hi,
sure, I use this code and I am getting the following error
confluence = Confluence(
url='https://confuence.xxx',
token='token')
Traceback (most recent call last):
File "guardian.py", line 52, in <module>
token='xxx')
File "confluence.py", line 38, in __init__
super(Confluence, self).__init__(url, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'token'
@chlamprecht - try changing your code to this:
confluence = Confluence(url="https://confluenceinstance.atlassian.net/",
username='your_username / email>',
password= '<token>',
cloud=True)
I had been struggling with this and the above worked for me.
I tried your code, but i am getting an 401 - forbidden. Are you sure to use Cloud=true? Because i try to connect against a data center edition.
I have the same issue connecting with a personal access token to a datacenter edition of Confluence. Is this currently supported?
Update: It works when using token
param instead of password
:
confluence = Confluence(
url='https://confluence.example.com',
username=os.environ["CONFLUENCE_USER"],
token=os.environ["CONFLUENCE_PASSWORD"],
cloud=False)
Since Version 7.9 of confluence (Server or DC) it is possible to use personal access tokens to login into the system.
Currently this works only for Jira. In the moment the token parameter isn't accepted for confluence.
It would be nice to use this feature for confluence too.