I am trying to call the confluence api to create a page:
POST to:
https://company.atlassian.net/wiki/api/v3/pages
Headers
Content-type: application/json
Authorization: Basic {base64 encode email:api}
Accept: application/json
Custom data:
{
"spaceId": "116588546",
"status": "current",
"title": "{{issue.Country}}",
"parentId": "116588848",
"body": {
"representation": "storage",
"value": "test"
}
}
However i get a 302 response with the following headers and no page is created.
Date: Wed, 24 May 2023 14:56:44 GMT
Content-Type: application/octet-stream
Content-Length: 0
Server: AtlassianEdge
Atl-Confluence-Via: h:confluence-prod-eu-5-3.prod.atl-paas.net
Location: https://company.atlassian.net/login?application=confluence&dest-url=%2Fwiki%2Fapi%2Fv3%2Fpages
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Atl-Traceid: ab4a3e9b107bca91
Report-To: {"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}
Nel: {"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
What am I doing wrong?