Forum Discussion

tavasjn24's avatar
3 years ago

Liql Request

Hey everyone. I am running into an issue when trying to query what role a user has when they log in. The query works fine when I use the api browser in studio. When I run it on the front end and I am not logged in as a admin account it returns a empty array every time. When I log in as an admin it runs just fine and shows the correct role when I am displaying it on the front end. Not sure what the issue is but any help would be appreciated.

 

Thanks.

  • Hi. Are you using FreeMarker? If so you need to use restadmin or liqladmin. 

    restadmin (khoros.com)

    liqladmin (khoros.com)

    They let you make liql requests with admin level permissions. API v2 liql does not require any authentication or special permissions as long as the info you are getting is publicly available, but roles are not visible to everyone (depending on your community permissions) which is why you are only seeing them when logged in to an admin account.

  • Hi. Are you using FreeMarker? If so you need to use restadmin or liqladmin. 

    restadmin (khoros.com)

    liqladmin (khoros.com)

    They let you make liql requests with admin level permissions. API v2 liql does not require any authentication or special permissions as long as the info you are getting is publicly available, but roles are not visible to everyone (depending on your community permissions) which is why you are only seeing them when logged in to an admin account.