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

# PFGroupsApplyToGroupAsync

> Applies to join a group

Applies to join a group

## Syntax

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

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

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

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. Creates an application to join a group. Calling this while a group application already exists will return the same application instead of an error and will not refresh the time before the application expires. By default, if the entity has an invitation to join the group outstanding, this will accept the invitation to join the group instead and return an error indicating such, rather than creating a duplicate application to join that will need to be cleaned up later. Returns information about the application or an error indicating an invitation was accepted instead. See also GroupAcceptGroupApplicationAsync, GroupListGroupApplicationsAsync, GroupRemoveGroupApplicationAsync. When the asynchronous task is complete, call [PFGroupsApplyToGroupGetResultSize](/services/playfab/api-references/c/pfgroups/functions/pfgroupsapplytogroupgetresultsize) and [PFGroupsApplyToGroupGetResult](/services/playfab/api-references/c/pfgroups/functions/pfgroupsapplytogroupgetresult) to get the result.

## Requirements

**Header:** PFGroups.h

## See also

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


## Related topics

- [PFGroupsApplyToGroupGetResult](/services/playfab/api-references/c/pfgroups/functions/pfgroupsapplytogroupgetresult.md)
- [Services C API overview - PFGroups.h](/services/playfab/api-references/c/pfgroups/pfgroups_members.md)
- [PFGroupsApplyToGroupGetResultSize](/services/playfab/api-references/c/pfgroups/functions/pfgroupsapplytogroupgetresultsize.md)
- [PFGroupsApplyToGroupResponse](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsapplytogroupresponse.md)
- [PFGroupsApplyToGroupRequest](/services/playfab/api-references/c/pfgroupstypes/structs/pfgroupsapplytogrouprequest.md)
