> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFGroupsAddMembersRequest

> PFGroupsAddMembersRequest 数据模型。向组或角色添加成员。组的现有成员将被添加到组内的角色，但如果用户已经。

PFGroupsAddMembersRequest 数据模型。向组或角色添加成员。组的现有成员将被添加到组内的角色，但如果用户尚未加入该组，则只有 title 声明者可以将其添加到组中，其他调用者必须使用组申请或邀请系统来向组中添加新成员。成功时不返回任何内容。

## 语法

```cpp theme={null}
typedef struct PFGroupsAddMembersRequest {  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFEntityKey const* group;  
    PFEntityKey const* members;  
    uint32_t membersCount;  
    const char* roleId;  
} PFGroupsAddMembersRequest;  
```

### 成员

**`customTags`**   [PFStringDictionaryEntry](/services/playfab/api-references/c/pftypes/structs/pfstringdictionaryentry) const\*<br />*may be nullptr*

（可选）与请求关联的可选自定义标记（例如生成号、外部跟踪标识符等）。

**`customTagsCount`**   uint32\_t

customTags 的数量

**`group`**   [PFEntityKey](/services/playfab/api-references/c/pftypes/structs/pfentitykey-c) const\*

组的标识符。

**`members`**   [PFEntityKey](/services/playfab/api-references/c/pftypes/structs/pfentitykey-c) const\*

要添加到组的实体列表。只有 title\_player\_account 和 character 类型的实体可以添加到组中。

**`membersCount`**   uint32\_t

members 的数量

**`roleId`**   const char\*<br />*is null-terminated*

（可选）可选：要将实体添加到的现有角色的 ID。如果未指定，则将使用组的默认成员角色。角色 ID 长度必须介于 1 到 64 个字符之间。

## 要求

**头文件：** PFGroupsTypes.h

## 另请参阅

[PFGroupsTypes 成员](/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members)


## Related topics

- [PFGroupsAddMembersAsync](/zh-CN/services/playfab/api-references/c/pfgroups/functions/pfgroupsaddmembersasync.md)
- [服务 C API 概览 - PFGroupsTypes.h](/zh-CN/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members.md)
- [PFGroupsIsMemberRequest](/zh-CN/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsismemberrequest.md)
- [PFGroupsListGroupMembersRequest](/zh-CN/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupslistgroupmembersrequest.md)
- [PFGroupsRemoveMembersRequest](/zh-CN/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsremovemembersrequest.md)
