Unauthorized; scope does not match

I am using code like this:

console.log(`Space data id: ${sdata.results[0].id}`);
const pres = await api

But the API call fails and the log says:

Space data id: 229380
Pages data: { "code": 401, "message": "Unauthorized; scope does not match" }

My manifest says:

    - read:confluence-content.summary
    - read:space:confluence
    - read:confluence-content.all
    - read:space:confluence

How do I solve this such that I get an array of all pages of my space?
Note: I get the space id from a comparable call that does work:


Hey there :wave: ,

The Endpoint documentation states that you need the scope read:page:confluence . Did you try that one yet?

Please note: The endpoint you are looking for is:


With the v2 APIs, you need to use the space id NOT the space key.