-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confluence API returned unexpected status: 401 - on self-hosted-confluence with an API-token #113
Comments
Hi, it didn't require an Authorization header before and we could pass a token as a password. Sounds like it's not possible now. |
I am seeing the same issue. The Confluence documentation does say that Personal Access Tokens is supposed to be put in a |
Same issue here.
|
Is it a hosted version of Confluence you are using? If so, which version? I have no problems accessing the cloud version of Confluence while using a token as a password. |
I think I may be having the same issue. We're on 7.4.11... Using a config file with username and password. Through --trace on I get
If I access the same URL through the browser, all works fine EDIT: Actually just figured it out... I was using my company email address as a username, however the X-AUSERNAME header in my browser was my network username. I switched my mark username to be the same as my network username and everything works :) |
Hello, I used username and API token to access the confluence page and I am not getting the 401 error message. However, I am getting 404 even though the page exists: Run for file in $(find -type f -name '*.md'); do echo "> Sync $file"; mark -u *** -p *** -b https://myspace.atlassian.net/ -f $file || exit 1;echo; done
Any thought? |
Hi, in case of cloud you should add /wiki to the URL as far as I remember.
…On Wed, Nov 3, 2021, 22:51 hyousif-pkglobal ***@***.***> wrote:
Hello,
I used username and API token to access the confluence page and I am not
getting the 401 error message. However, I am getting 404 even though the
page exists:
Run for file in $(find -type f -name '*.md'); do echo "> Sync $file"; mark
-u *** -p *** -b https://myspace.atlassian.net/ -f $file || exit 1;echo;
done
Sync ./README.md
2021-11-03 16:40:32.781 INFO processing ./README.md
2021-11-03 16:40:33.137 FATAL unable to resolve page
└─ can't obtain home page from space "myspace"
├─ Confluence API returned unexpected status: 404 (Not Found)
└─ title: README_MD_FILE
Error: Process completed with exit code 1.
Any thought?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#113 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAN7ZE2G62YXK7CTF7CU23UKFZAPANCNFSM5DURTE5A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Awesome! It works now. |
For on-prem Confluence it seems the is both "personal access token" and "api tokens". The latter actually works using the basic authentication header. It is possible to issue API token (instead of PAT tokens) by visiting the Confluence URL |
I'm also using it with an on-prem Confluence and running into the same issue (can't use PAT, only password). Would you accept a PR adding support for PAT? I'd be happy to extend gopencils to support bearer tokens, and then use it here to support PAT. |
This was helpful to me. I recommend including it in the documentation for |
I've just learned that if you leave the username empty and specify your PAT as password, it will be sent as bearer token. This way i got the authentication working. |
This is the way. |
I am using a hosted confluence (7.13.7). I can confirm commenting out the "username = " is the -only- way a personal access token works for me. |
Hi,
our company uses a self-hosted confluence. When I try to upload files with my username and password it works without any issues. But when I try to use my created token I get a 401-error. I created the token with the following method: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html#UsingPersonalAccessTokens-CreatingPATsinapplication
I tried to use following command:
mark -u <my_username> -p <my_token> -b 'https://my-company-wiki.net/' -f confluence_test.md
and
mark -p <my_token> -b 'https://my-company-wiki.net/' -f confluence_test.md
but both commands return the same output:
When I use the token to create a new page directly via curl it also works:
Is it even possible to use a token with mark or have I made a mistake?
The text was updated successfully, but these errors were encountered: