You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi Team,
I am using below python code to get some confluence page data , but i am getting 401 CLient error .
Please suggest.
from atlassian import Confluence
confluence = Confluence(
url='https://myconfluence.domain.com',
username='companyemailid',
password='APItokengenerated')
# If you know Space and Title
content1 = confluence.get_page_by_title(space="DOSNI", title="Airflow")
print(content1)
Error
requests.exceptions.HTTPError: 401 Client Error: for url: https://url/rest/api/content?start=0&limit=1&spaceKey=DOSNI&title=Airflow
Welcome to Community! What's your hosted platform? are you using Cloud or Self-hosted. If it's the latter you might want to specify the direct URL where your confluence is installed and stick to username and password. Otherwise if it's Cloud use
https://myconfluence.atlassian.net/wiki
Then generate your API token and use with your email Address.
Hi @Prince Nyeche ,
Thanks a lot for the quick reply, I dont have atlassian.net in the url , so I think confluence is hosted on prem Dataserver.
I started initially by trying username as password in atlassian module like below .
from atlassian import Confluence
confluence = Confluence(
url='https://myconfluence.companyname.com',
username='myid',
password='password')
But it also threw 401 Error.
Just to add, we have ping federated integrated as two factor authentication .
So after first authentication with username and password, we need to provide ping id also which we received as SMS to login to confluence .
Can you please let me know in such cases , how can i fetch data using REST API , or if there is any other way for fetching data .
'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be a problem then, 2FA will definitely block the authentication from working. Server Products doesn't use an API key which bypasses 2FA features. Alternatively, I believe this framework supports OAuth. Something you could configure on your Server if you possess the access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond. A long time favorite, Team Cale...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.