You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
I am trying to access pages via the `atlassian-python-api` library in Python. I have read through this page on authentication and tried every method, but none of them have worked for me. Each attempt, I get a 401. I have created a personal access token both through my Atlassian account, as well as directly on Confluence. Below is a code snippet - my assumption is that I am getting 401 every time due to the 2FA requirement. What is the right way to fix this so I can get access to my organization's Confluence pages via python?
Additionally, is there a login method that is something similar to opening a browser and having the user login to their Confluence account there, instead of using an API token?
Hey, Matthew. I am facing a similar problem. Were you able to come up with a solution for it yet?
Hi Amaan, I was able to make my own solution, which unfortunately didn't use a placeholder, but is ultimately a better option. I ended up using selenium to create a web browser, then have the user log in, and once the user was logged in, I saved the cookies to a Netscape HTTP Cookies File format, and using those cookies to authenticate has worked fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Matthew Kennedy welcome to the Atlassian Community.
This seems to be a question about Confluence rather than a question related to the add-on Questions for Confluence. I am moving this to the Confluence collection to get more eyes on this and hopefully an answer for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.