> ## 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](/zh-TW/services/playfab/api-references/c/pftypes/structs/pfstringdictionaryentry) const\*<br />*may be nullptr*

（選擇性）與要求相關聯的選擇性自訂標籤（例如組建編號、外部追蹤識別碼等）。

**`customTagsCount`**   uint32\_t

customTags 的計數

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

要執行此動作的實體。

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

群組的識別碼。

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

（選擇性）選擇性。要將使用者指派到之群組中現有角色的 ID。若未指定，則會使用群組的預設成員角色。角色 ID 的長度必須介於 1 到 64 個字元之間。

## 需求

**標頭：** PFGroupsTypes.h

## 另請參閱

[PFGroupsTypes 成員](/zh-TW/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members)


## Related topics

- [PFGroupsInviteToGroupAsync](/zh-TW/services/playfab/api-references/c/pfgroups/functions/pfgroupsinvitetogroupasync.md)
- [服務 C API 概觀 - PFGroupsTypes.h](/zh-TW/services/playfab/api-references/c/pfgroupstypes/pfgroupstypes_members.md)
- [Invite To Group](/api-reference/groups/invite-to-group.md)
- [PFGroupsInviteToGroupResponse](/zh-TW/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsinvitetogroupresponse.md)
- [PFGroupsApplyToGroupRequest](/zh-TW/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsapplytogrouprequest.md)
