Sorry if I ask something too obvious but I am quite Junior dev and not familiar with curl at all.
I am trying to create a new page following the documentation but I keep getting a 401 response, although if I use the login sample command in the docu (curl -D- -X GET -H "Authorization: Basic <MyEncodedEmailrAndToken>" -H "Content-Type: application/json"https://myspace/wiki/rest/api/space) ) I get a 200 status response, so I assume my login ddetails are correct.
The command I am using is: curl -D- -H "Authorization: Basic <MYTOKEN>" -X POST -H 'Content-Type:application/json' https://myspace/confluence/rest/api/content/ -d '{"type":"page","title":"TEST", "space":{"key":"AGE2DE"},"body":{"storage":{"value":"Test","representation":"storage"}}}'
And this is the error I keep getting
Does your user have the permission to create a page in this "AGE2DE" space?
Regards, Dominic
HI Dominic, I can create pages manually if that is what you mean, but I cannot create them when using the API command mentioned above
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is a good example. It seems, you do not have any headers:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dominic Lagger I am using the example in the documentation so I am not sure what you mean when saying I do not have any headers as I am basically copying the example there and just modify with my space values
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm this is a bit strange. I just checked with one of my calls.
I have another header:
'X-Atlassian-Token': 'no-check'
Can you probably check with this?
If this does not work, I would suggest you to ask in the developer community.
https://community.developer.atlassian.com/
Regards, Dominic
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.