Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,517
Community Members
 
Community Events
184
Community Groups

Getting 404 and 403 using Rest API and Rest API V2

Mohammad Zaman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 26, 2023
Hello, 
I am trying to call Confluence Cloud V2 Rest API using the access token by using 3LO Authentication mechanism (code grant). 

I can generate an Access_Token and also see correct scopes.

I tried using the REST API and REST API (v2). 

I get the pageId from the Page Information
{ATLASSIAN_DOMAIN}/wiki/pages/viewinfo.action?pageId=2654211


Using Rest API V1:  (DEPRECATED)
curl --location --request GET 'https://{ATLASSIAN_DOMAIN}/wiki/rest/api/content/{id}' \

--header 'Authorization: Bearer {ACCESS_TOKEN}


RESPONSE:

{

"message": "Current user not permitted to use Confluence",

"statusCode": 403

}



Using Rest API V2: There is no API documentation for v2 for getting content by pageId.
However, I tried using the V2 GET Page By Id:

Get Page By Id V2 

curl --location --request GET 'https://{domain-name}.atlassian.net/wiki/api/v2/pages/2654211' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Accept: application/json'
Response: 
{
"errors": [
{
"status": 404,
"code": "NOT_FOUND",
"title": "Not Found",
"detail": null
}
]
}

 
I can retrieve and see the scopes by calling 
https://api.atlassian.com/oauth/token/accessible-resources
with the Access_Token:

curl --location --request GET 'https://api.atlassian.com/oauth/token/accessible-resources' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Accept: application/json'


"scopes"
: [
"write:space:confluence",
"read:content-details:confluence",
"read:space-details:confluence",
"read:space.permission:confluence",
"read:space:confluence",
"read:custom-content:confluence",
"write:content.property:confluence",
"write:page:confluence",
"read:content.property:confluence",
"read:user:confluence",
"write:content:confluence",
"read:content.permission:confluence",
"read:content:confluence",
"read:attachment:confluence"
],



1 answer

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 30, 2023
Mohammad Zaman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 01, 2023 • edited May 04, 2023

Hi @Alex Koxaras _Relational_ , 

Thank you for replying. I tried with custom-content by Id, i still get 404

{

"errors": [
{
"status": 404,

"code": "NOT_FOUND",

"title": "Not Found",

"detail": null

}

]
Mohammad Zaman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 01, 2023

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events