Authentication Error In The Python API.

Cameron Pilla June 1, 2022

I am defining my confluence instance as seen below:

confluence = Confluence(
url="https://wiki.COMPANY.com",
username="MYNAME@company.com",
password="APIKEY")

And when I attempt the code:

content = confluence.get_page_by_id("ID.OF.SOME.PAGE.I.CREATED.AND.PUBLISHED")

I get the following error:

requests.exceptions.HTTPError: 401 Client Error: for url: "PAGE I WANT"

 
Is this somehow and issue with the code or is it some issue with the permissions of my organization's confluence?

1 answer

0 votes
Andrii Maliuta
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.
June 1, 2022

Hi @Cameron Pilla ,

Do you use https://github.com/atlassian-api/atlassian-python-api ?

Please note that for Cloud Confluence the URL will be yoursite.atlassian.net/wiki and for server any domain.

  • For Cloud you use Username=email and pass = security token generated in your Atlassian profile
  • For Server/DC you yse username={USERNAME} (not email) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events