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

# PFGroupsAcceptGroupInvitationAsync

> Accepts an invitation to join a group

Accepts an invitation to join a group

## Syntax

```cpp theme={null}
HRESULT PFGroupsAcceptGroupInvitationAsync(  
    PFEntityHandle entityHandle,  
    const PFGroupsAcceptGroupInvitationRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFGroupsAcceptGroupInvitationRequest\*](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsacceptgroupinvitationrequest)

Populated request object.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on all platforms. Accepts an outstanding invitation to join the group if the invited entity is not blocked by the group. Only the invited entity or a parent in its chain (e.g. title) may accept the invitation on the invited entity's behalf. Nothing is returned in the case of success. See also GroupInviteToGroupAsync, GroupListGroupInvitationsAsync, GroupListMembershipOpportunitiesAsync, GroupRemoveGroupInvitationAsync. Call XAsyncGetStatus to get the status of the operation. If the service call is unsuccessful, the async result will be E\_PF\_ENTITY\_BLOCKED\_BY\_GROUP, E\_PF\_ENTITY\_IS\_ALREADY\_MEMBER, E\_PF\_GROUP\_INVITATION\_NOT\_FOUND, E\_PF\_ROLE\_DOES\_NOT\_EXIST or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Requirements

**Header:** PFGroups.h

## See also

[PFGroups members](/services/playfab/api-references/c/pfgroups/pfgroups_members)


## Related topics

- [Services C API overview - PFGroups.h](/services/playfab/api-references/c/pfgroups/pfgroups_members.md)
- [PFGroupsAcceptGroupApplicationAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupsacceptgroupapplicationasync.md)
- [PFGroupsAcceptGroupInvitationRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsacceptgroupinvitationrequest.md)
- [PFGroupsListGroupInvitationsAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupslistgroupinvitationsasync.md)
- [PFGroupsRemoveGroupInvitationAsync](/services/playfab/api-references/c/pfgroups/functions/pfgroupsremovegroupinvitationasync.md)
