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 Experts,
I am recently exploring confluence REST APIs. I was trying examples at https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/
So I created a my free sample Space & Confluence Page at Atlassian cloud https://userid.atlassian.net/
When I tried using curl GET example I am getting
{
"message": "Current user not permitted to use Confluence",
"statusCode": 403
}
I referred all the examples & Suggestions given at below links but couldn't able to figure out the issue. If you could help me out in understanding and showing me the direction that would be great.
https://community.developer.atlassian.com/t/401-unauthorized-with-bearer-token-from-oauth/42561
Error step:
C:\Users\sent>curl -D- --ssl-no-revoke -u <userid>:<Api token> -X GET -H "Content-Type: application/json" https://userid.atlassian.net/wiki/rest/api/content/<pageno>
HTTP/1.1 403 Forbidden
Server: AtlassianProxy/1.19.3.1
vary: Accept-Encoding
cache-control: no-cache, no-store, must-revalidate
Content-Type: application/json
Strict-Transport-Security: max-age=315360000; includeSubDomains; preload
Date: Thu, 27 Jan 2022 20:28:40 GMT
ATL-TraceId: 08513d1914924ded
expires: Thu, 01 Jan 1970 00:00:00 GMT
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked
x-envoy-upstream-service-time: 42
X-Content-Type-Options: nosniff
ATL-Confluence-Via: h:confluence-prod-us-7-3.prod.atl-paas.net
Expect-CT: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400
Connection: Keep-Alive
{"message":"Current user not permitted to use Confluence","statusCode":403}
I just faced the same problem, after digging a little bit in the suggested examples by @Pramodh M I found the solution that worked for me.
What you need to do is essentially just add an `Authorization` header with the following format:
`Authorization: Basic <base64 encoded token>`
Where the `<base64 encoded token>` should be generated by encoding the following string:
`your_email@domain.com:your_user_api_token` => Base64 encoding => `eW91cl9lbWFpbEBkb21haW4uY29tOnlvdXJfdXNlcl9hcGlfdG9rZW4=`
(Atlassian recommends this site for the encoding https://www.base64encode.net/)
Keep in mind, at first I could not make it work too, but then I remembered that my email was changed so I had to generate a new encoded token, following which the API call worked.
Hope this helps!
Regards,
Art Linkov
Did you create a token from here
https://id.atlassian.com/manage-profile/security/api-tokens
And can you navigate to Confluence UI?
Let me know
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Pramodh M
Yes, I created a API token at https://id.atlassian.com/manage-profile/security/api-tokens
{
"message": "Current user not permitted to use Confluence",
"statusCode": 403
}
Thanks in Advance.
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.
I just found it here. I also encountered a similar problem. The difference is that I can upload successfully using curl, but I try to send about 800m files in GitHub action (I'm waiting for pipeline to update some features to switch to bitbucket)
`{"message":"Current user not permitted to use Confluence","statusCode":403}`
Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please follow the format here to successfully call the API
https://developer.atlassian.com/cloud/confluence/rest-api-examples
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Pramodh M
Thanks for your reply. But I am still facing the same error.
I am following the same procedure as you pointed out. Any help is much appreciated here
Regards,
Senthil Prasanth K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Senthil Prasanth make sure you don't forget to replace the "your-domain.atlassian.net" in the url variable with your actual domain... may not be the issue you are having, but i totally missed it
url = "https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child"
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.