atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

Can't make basic connection to Confluence Page

Open chrisg423 opened this issue 2 years ago • 12 comments

This is an issue I am having trying to use the Atlassian Python API's Confluence module to edit a page. So far, all I have in my code is the call to connect to the page using:

conf = Confluence(url=conf_site, username=conf_user, password=conf_pass, cloud=True) (obviously I have real values set for the url, username, and password)

and then a call to try and get the status of a page:

status = conf.get_page_properties(page_id=x) (again, obviously with a real value filled in for x)

and then I try to print that status. However, I get a bunch of traceback errors that look like this:

Screen Shot 2022-11-04 at 3 49 10 PM

I have tried this both on a Windows PC as well as a Mac. I get the same sort of traceback errors both times. Please let me know if you have seen anything like this before or if you can point me in the right direction. Thank you.

chrisg423 avatar Nov 04 '22 19:11 chrisg423

Hi! A I see you're using on prem Confluence could you try the next parameter

conf = Confluence(url=conf_site, username=conf_user, password=conf_pass, cloud=False)

gonchik avatar Nov 04 '22 19:11 gonchik

Hi! A I see you're using on prem Confluence could you try the next parameter

conf = Confluence(url=conf_site, username=conf_user, password=conf_pass, cloud=False)

Did that, still nothing. Got the exact same traceback errors.

chrisg423 avatar Nov 04 '22 20:11 chrisg423

Just curious can you make a telnet request?

telnet confluence.example.com 443

gonchik avatar Nov 04 '22 20:11 gonchik

Just curious can you make a telnet request?

telnet confluence.example.com 443

Excuse my ignorance with Telnet, but I just installed and tried to do that and I am getting nodename nor servname provided, or not known

Any idea how to deal with that?

chrisg423 avatar Nov 04 '22 21:11 chrisg423

@chrisg423 so you need to check your DNS records.

  1. Is this on-prem installation ? if so. you can put record into /etc/hosts or ping system admins.

gonchik avatar Nov 05 '22 09:11 gonchik

@chrisg423 so you need to check your DNS records.

  1. Is this on-prem installation ? if so. you can put record into /etc/hosts or ping system admins.

Yes, this is on-prem. I did just realize we go through a proxy server though. Is there anything special I'll have to do for that? I did not see anything noted in the documentation.

chrisg423 avatar Nov 07 '22 19:11 chrisg423

Hi, still wondering if there is anything special I would have to do to bypass a proxy server. Please let me know if you can. Thank you.

chrisg423 avatar Nov 14 '22 16:11 chrisg423

You can use the cookies parameters to go through proxy server. just copy from your browser the cookies and put into script

gonchik avatar Nov 14 '22 21:11 gonchik

You can use the cookies parameters to go through proxy server. just copy from your browser the cookies and put into script

Two questions...

  1. Does that mean you guys don't allow for API token authentication/OAuth?
  2. Do you have documentation that specifies how you use the cookies parameter?

Thank you very much for your continued assistance through this. I am not too familiar with API calls and your continuous support is extremely appreciated.

chrisg423 avatar Nov 15 '22 14:11 chrisg423

Hello, just looking for answers to the above. Let me know, thanks.

chrisg423 avatar Nov 28 '22 16:11 chrisg423

Hello, Could you install that extension to your browser https://www.editthiscookie.com/

then copy into file and follow instruction on main file of instruction please https://docs.python.org/3/library/http.cookiejar.html

gonchik avatar Nov 28 '22 17:11 gonchik

Can we have some update on this issue please? How can we use this with a Jira or Confluence API token?

eabase avatar Jan 20 '23 15:01 eabase