I'm trying to create a page from powershell using the following command -
$json = "{""type"": ""page"",""title"": ""My test page 2"",""space"": {""key"": ""TST""},""body"": {""storage"": {""value"": ""Another testing"",""representation"": ""storage""}}}"
$res = Invoke-RestMethod https://xxxx.xxx.net/wiki/rest/api/content/ -Method Post -Body $json -Headers @{Authorization = "Basic xxxxxxx"} -ContentType 'application/json'
However, I'm getting 403 Error. I can create page using menu options with no problem, so clearly I have necessary authority. I can also make GET request with no problem. I appreciate if anyone could point out my mistake.
Thanks