404 when accessing Confluence via Postman

Hi,
I’m very new to Confluence and just ‘scratching the surface’ to get my colleagues enthousiastic for Confluence as a knowledgebase. I’ve created a space, added pages and now I want to show them how easy it is to access the API with Postman.

I’ve created an API key, and use that key with Basic Authentication, imported the postman collection (https://developer.atlassian.com/cloud/confluence/rest/v2/intro/#about).

And in Postman setup the variables. Used basic authentication with the API token. Now for pages which I can access in the browser, e.g. ‘https://oursite.atlassian.net/wiki/api/v2/pages/43909133’ I get 404 NOT_FOUND

When I copy & paste the url from the Postman console it works well. My user permissions should be sufficient, checked that. What else can be wrong?

Kind regards,

Michael

Welcome to the Atlassian developer community @MichaelvandenDool,

There’s nothing obvious about what you’re doing wrong. It seems like it should work.

Maybe to isolate the problem a little, you could start with simple URL hacking in your browser URL bar. For me, I have a page:
https://devpartisan.atlassian.net/wiki/spaces/API/pages/576815105/Hello

Then I can keep the page ID and change to a REST API url which will auth using my browser cookie:
https://devpartisan.atlassian.net/wiki/api/v2/pages/576815105

If that works, then maybe something went wrong in getting your basic auth variables set up? Your username should be an email address, and the password is the API Token.

Let us know what you learn.

2 Likes

You were right, problem was related to the basic authentication variable set-up. With your tip to ‘simplify’ the url I was able to get the page. Problem solved now :slight_smile:

Thanks a lot for your help!

Kind regards,

Mike

1 Like