Can legacy rank of a user retrieved by REST API without logging into instance?
- 12 years ago
Hi Sunny,
I'm not sure exactly what you mean by legacy rank. Are you simply referring to the user's current rank in the community? If so, it could be the case that the annoymous user does not have permission to make the REST API call you're attempting.
I assume you're using the "rest(...)" custom Freemarker context object? If it's an issue with permissions and you want to still expose this information to anonymous users, you could use the "restadmin(...)" to make the request as an administrator user instead. This will allow you to bypass the permission issues, but I do urge caution when using this context object since you are in effect making the call as an administrator.
"restadmin" should be used very sparingly, and when it is used you should take extra care to ensure that any user inputs that might be passed into the REST API call are properly sanitized.