Documentation

sonet_group.user.groups

Returns array of social network groups of the current user by calling CSocNetUserToGroup::GetList().

Each group is an array with the following fields:

  • GROUP_ID - Social network group ID
  • GROUP_NAME - Social network group name
  • ROLE - User's role in the group:
    • SONET_ROLES_OWNER (A) - Owner,
    • SONET_ROLES_MODERATOR (E) - Moderator,
    • SONET_ROLES_USER (K) - User

Example

// Get list of groups of the current user

BX24.callMethod('sonet_group.user.groups', {});

Request:

https://mydomain.bitrix24.com/rest/sonet_group.user.groups.json?auth=52423d4a5f19f5f964f9b4e96a925cfa

Response:

{"result":[{"GROUP_ID":"1","GROUP_NAME":"\u041c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433 \u0438 \u0440\u0435\u043a\u043b\u0430\u043c\u0430","ROLE":"A"},{"GROUP_ID":"3","GROUP_NAME":"\u041f\u0440\u043e\u0434\u0430\u0436\u0438","ROLE":"A"},{"GROUP_ID":"5","GROUP_NAME":"\u041e\u0442\u0434\u044b\u0445","ROLE":"A"},{"GROUP_ID":"7","GROUP_NAME":"\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438","ROLE":"A"},{"GROUP_ID":"9","GROUP_NAME":"\u0424\u0440\u0438\u043b\u0430\u043d\u0441","ROLE":"A"},{"GROUP_ID":"13","GROUP_NAME":"Test sonet group","ROLE":"A"},{"GROUP_ID":"15","GROUP_NAME":"Test sonet group","ROLE":"A"}]}


© «Bitrix24», 2001-2024
Up