Forum Discussion
PerBonomi Give it a shot with restadmin. It would work even in logged out case.
In your case session id does not impact to anything.
1. You are passing the user login so it is posting by a normal user. I would work in the same way even you remove the session id.
2. It is posted by admin as you did not pass any user login/id.
You can use this endpoint as well no need for any type of session generation, just need to pass the user id directly.
<#assign escalatesubject = http.request.parameters.name.get("escalatesubject","Here is subject")> <#assign escalatebody = http.request.parameters.name.get("escalatesubject","Here is body")> <#assign userid = 100 /> <#assign addPost = restadmin("/boards/id/001/messages/post?message.subject=${escalatesubject?url}&message.body=${escalatebody?url}&message.author=/users/id/${userid}") />
Hey thanks for that. Using the API for other things isn't an issue, I just thought I'd do kind of an AB test to make sure the way I generate the session key is correct :)
- TariqHussain8 years agoBoss
PerBonomi- As i mentioned above, there is no issue in your code. Session key doesn't seem to be working in an endpoint, even it is being generated correctly.
Even though you have generated the session key for admin user but the second rest call is not accepting the session key which makes the rest call without context of any user and throwing 403 issue.
- PerBonomi8 years agoBoss
Oh, I believed you from the start, don't get me wrong; I've seen you and your great solutions around long enough.
But if you've ever tried to convince Lithium support of your plight, you know you need to do extra testing, troubleshooting and show incontrovertible proof of your issue :)
- TariqHussain8 years agoBoss
PerBonomi- Totally agreed with you regarding extra testing and troubleshooting. As this seems to be lithium bug and session key should work for logout users and inside endpoint, You can post this suggestion here:
https://community.lithium.com/t5/Suggestions-for-Our-Community/bd-p/Help
Related Content
- 2 years ago
- 11 months ago
- 2 years ago