I am trying to do a post request on my companies confluence to make a page using the REST API.
When I attempt to do it, I get a JSON response saying that it is forbidden.
I am able to make a page from the GUI, but not with the REST Api.
I have done Basic Authentication for the query.
Below is a picture of the request and the response.
My Question : how can I make the page on the confluence space with the rest Api?
I have tried: making a personal access token. And then using it with my request, but that didnt work either.
Can you try below API and let me know the result
curl -u username:password -X POST -H 'Content-Type: application/json' \
-d '{"type":"page","title":"new page", "ancestors":[{"id":1638403}], "space":{"key":"SPACE_KEY"},"body":{"storage":{"value": "<p>This is a new page</p>","representation":"storage"}}}' \
http://confluence-site-url/rest/api/content
Thanks,
Pramodh
Here's a link for Ref
https://developer.atlassian.com/server/confluence/confluence-rest-api-examples
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.