I'm using OAuth 2.0 (3LO) to access the Confluence API from my app. I'm able to GET spaces fine, but trying to POST a new page gives me a 403 error. This is how my request is structured using superagent:
request.post('https://api.atlassian.com/ex/confluence/<MyCloudId>/wiki/rest/api/content')
.set('Authorization', 'Bearer ' + <MyAccessToken>)
.send({
"type": "page",
"title": "Test",
"space": {
"key": "TS"
},
"body": {
"storage": {
"value": "<p>Test page</p>",
"representation": "storage"
}
}
})
.then(...);
The documentation says a response code of 403 either means the space doesn't exist or I don't have permission to create the page.
I've tried different space keys and IDs from my Confluence instance and triple checked I have the OAuth scope of write:confluence-content, but still getting 403.
Not sure what I'm doing wrong, any help would be appreciated!