Hi,
I am using basic authentication to create a blog post through CURL and it was working before few days but suddenly somehow it stopped to work.
Code:
curl -H "Authorization: Basic Y29udHJhY3RvckBwcm9jY" -X POST -H 'Content-Type: application/json;charset=utf-8' -d '{"type":"blogpost","title":"new blog post",
"space":{"key":"devops"},"body":{"storage":{"value":"test","representation":
"storage"}}}' https://localhost:8080/wiki/rest/api/content/
It is giving the error: {"statusCode":403,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"Could not create content with type blogpost"}
Please advise! Thanks in advance!
The 403 error indicates that your account being used in basic auth no longer has the necessary permission to make a blog post.
Please refer to https://confluence.atlassian.com/confcloud/assign-space-permissions-724764762.html for how to grant this user access to add blog posts to the space.
Hi Miller,
I've provided the all permission to individual user as described in above link, even though it fails. Also would like to inform that, It was working absolutely fine before few days.
Moreover, if i removed the "type" parameter then authentication turns into success.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking around I might check here https://community.atlassian.com/t5/Confluence-questions/quot-statusCode-quot-403-quot-Could-not-create-content-with-type/qaq-p/5693
Are you sure that your space key is spelled correctly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Miller,
Yes, I am sure about the space key spelled correctly.
Thanks
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.