I am looking to automate a procedure of creating new pages and also editing existing pages within Confluence.
Currently, I am referencing the following document:
https://developer.atlassian.com/cloud/confluence/rest-api-examples/
When playing around with the APIs, I noticed that all GET commands doesn't really give me any issues and returns back what I like to see. However, everytime I make a PUT or POST command, i get a response back of 403 forbidden. I have verified that my account can create, modify pages and spaces within the UI so theorically I should have the same privilege when making API calls.
An example of a CURL I used is as following to create a new page:
curl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"new page","space":{"key":"VAL"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' https://company.atlassian.net/wiki/rest/api/content/
I have verified that there exists a space named "VAL". Any suggestions on what I can do or what is causing this issue?