> ## 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.

# PFGroupsInviteToGroupRequest

> PFGroupsInviteToGroupRequest 数据模型。邀请玩家加入组（前提是该玩家未被该组阻止）。可提供一个可选角色以在玩家接受邀请后自动分配。

PFGroupsInviteToGroupRequest 数据模型。邀请玩家加入组（前提是该玩家未被该组阻止）。可提供一个可选角色，以便在玩家接受邀请后自动将其分配到该角色。默认情况下，如果该实体已有对该组的未处理申请，此调用将改为接受该申请并返回一个指示该情况的错误，而不是创建之后需要清理的重复入组邀请。返回有关新邀请的信息，或指示已接受现有加入申请的错误。

## 语法

```cpp theme={null}
typedef struct PFGroupsInviteToGroupRequest {  
    bool const* autoAcceptOutstandingApplication;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFEntityKey const* entity;  
    PFEntityKey const* group;  
    const char* roleId;  
} PFGroupsInviteToGroupRequest;  
```

### 成员

**`autoAcceptOutstandingApplication`**   bool const\*<br />*may be nullptr*

（可选）可选，默认为 true。如果存在申请，则自动接受该申请，而不是创建邀请。

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

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

**`customTagsCount`**   uint32\_t

customTags 的数量

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

要对其执行此操作的实体。

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

组的标识符。

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

（可选）可选。要分配给用户的组中现有角色的 ID。如果未指定，则使用该组的默认成员角色。角色 ID 的长度必须介于 1 到 64 个字符之间。

## 要求

**头文件：** PFGroupsTypes.h

## 另请参阅

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


## Related topics

- [PFGroupsInviteToGroupAsync](/zh-CN/services/playfab/api-references/c/pfgroups/functions/pfgroupsinvitetogroupasync.md)
- [服务 C API 概览 - PFGroupsTypes.h](/zh-CN/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members.md)
- [PFGroupsApplyToGroupRequest](/zh-CN/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsapplytogrouprequest.md)
- [PFGroupsInviteToGroupResponse](/zh-CN/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsinvitetogroupresponse.md)
- [PFGroupsInviteToGroupGetResult](/zh-CN/services/playfab/api-references/c/pfgroups/functions/pfgroupsinvitetogroupgetresult.md)
