I am using code like this:
console.log(`Space data id: ${sdata.results[0].id}`);
const pres = await api
.asUser()
.requestConfluence(route`/wiki/api/v2/spaces/${sdata.results[0].id}/pages`);
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:
permissions:
scopes:
- 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:
.requestConfluence(route`/wiki/api/v2/spaces?keys=${spaceKey}`);