This question is in reference to Atlassian Developer Documentation: Confluence REST API Examples
When i use http://localhost:8080/confluence/rest/api/content to create a new page, but always return with status 403, "message": "You're not allowed to view that space, or it does not exist." . why?
Hoping to hear from you soon. please contact with me by email blemie@outlook.com
Community moderators have prevented the ability to post new answers.
That's usually a case of the user issueing the REST call not having access to the space you are trying to create the page in. Mostly, the wrong user id has been used, or they're not logging in. (Ok, sometimes people slip up and put the wrong space in the call, but it's usually the permissions)
But i am the admin of this system, and another thing i need to mention, when i update a page,i have the authentication to edit the page. When create a new page, the same way doesn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
image2016-5-10 19:16:5.pngimage2016-5-10 19:16:59.png
These two are the screen shortcut. Thanks man.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, well, admin is not relevant, it's the question of if the user account you are using to log in over REST has create/edit rights. When you say you "update a page" - is that over REST as well? If so, then what is different about the authentication in your update and create calls?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
eh, I found no matter update or create a page, the authentication process always fails. And i am so sure about the username and password are totally correct, and i have enabled the remote API setting on confluence, this is the url i used:http://localhost:8080/confluence/rest/api/content/ . Authorization:Basic YmxlbWllOjEyMzQ1
Except what i have mentioned, is there anything i forget to set to make it work well?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, that answers it - failed authentication means it doesn't know who you are, and hence you don't have permission to make the changes.
I don't know what you're doing to authenticate though, so I can't really tell you anything more than "you need to get the authentication fixed"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
image2016-5-12 10:25:7.png
image2016-5-12 10:27:6.png
image2016-5-12 10:29:7.png
And i add Authorization:Basic YmxlbWllOjEyMzQ1 in the http header. That's all i did to authenticate. Except these, do i need to anything else? Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to authenticate your REST call. Please see here: https://developer.atlassian.com/fecrudev/remote-api-reference/rest-api-guide/authenticating-rest-requests
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks,man. But every request i submit contains the username and password encoded with base64, i use this way to authenticate my REST call, is that wrong ?
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.