Rest API to get the groups available to current user
- 12 years ago
If you're not seeing any groups, I'd suggest double checking your default permissions for groups to ensure that users have access to see and join groups. You might also want to check to make sure that there isn't any code in your custom component that would be wrapping the REST call and preventing it from occuring (i.e. some other permission/role check you may have added).
One way to do a quick check to see if it's a permission issue vs something with your component would be to create a separate test component and add this snippet:
<#list rest("/groups/list").groups.group as group> ${group.id}, </#list>
You could even add it to an announcements section temporarily if you didn't want to create a separate component. If you login as a regular user and view the page this code is on, you should see a list of Group IDs. If you don't, it's likely a permission issue. If you do see it, there's likely an issue with your custom component.