Access membership of non visible groups via API

I am trying to use the API to determine if a user is a member of a group that has “Group is visible to all users” unchecked. Even when I use an admin API username and key when pulling in a user profile (via /users/username.json), the json that is returned only lists the groups that are visible to all users (i.e. where user->custom_groups->visible is true).

Is there any way to get the membership of custom groups that are visible:false from the user profile? It seems like an admin API user and key should have access to that information.

Try /admin/users/username.json ?


That works, thanks!

I’ll just have to make two API calls, one for the public profile information, and one for the admin-visible profile information.