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

# XblMultiplayerActivitySendInvitesAsync

> XblMultiplayerActivitySendInvitesAsync

# XblMultiplayerActivitySendInvitesAsync

Sends invites to XBOX user IDs to join the caller's current activity.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerActivitySendInvitesAsync(  
         XblContextHandle xblContext,  
         const uint64_t* xuids,  
         size_t xuidsCount,  
         bool allowCrossPlatformJoin,  
         const char* connectionString,  
         XAsyncBlock* async  
)  
```

### Parameters

*xblContext*   \_In\_\
Type: [XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

XBOX Live context for the local user.

*xuids*   \_In\_\
Type: uint64\_t\*

List of XBOX user IDs to invite.

*xuidsCount*   \_In\_\
Type: size\_t

Size of the `xuids` array.

*allowCrossPlatformJoin*   \_In\_\
Type: bool

If the title is configured for cross-platform invites, setting this parameter to true sends an invite to all platform endpoints that the title supports. If set to false, the invite is sent to the sender's platform only. If cross-platform invites are not configured, the invite is always sent to the sender's platform only.

*connectionString*   \_In\_opt\_z\_\
Type: char\*

(Optional) Connection string that the peer uses to join the game.

*async*   \_In\_\
Type: XAsyncBlock\*

The `XAsyncBlock` for this operation.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

To get the result of the asynchronous operation, call [XAsyncGetStatus](/reference/system/xasync/functions/xasyncgetstatus) inside the `XAsyncBlock` callback or after `XAsyncBlock` is complete. <br /><br /> To see how this function is used, see "Sending invites" in the [Invites](/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to#invites) section of [Example code for Multiplayer Activity](/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to). <br /><br /> For more information about multiplayer activities, see [Activities](/services/xbox-services/multiplayer/mpa/concepts/live-mpa-activities).

## REST Call

Calls POST /titles/{titleId}/invites

## Requirements

**Header:** multiplayer\_activity\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[multiplayer\_activity\_c](/reference/live/xsapi-c/multiplayer_activity_c/multiplayer_activity_c_members)


## Related topics

- [Example code for Multiplayer Activity](/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [XGameUiShowMultiplayerActivityGameInviteAsync](/reference/system/xgameui/functions/xgameuishowmultiplayeractivitygameinviteasync.md)
- [XblMultiplayerSendInvitesAsync](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersendinvitesasync.md)
- [XblMultiplayerSendInvitesResult](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersendinvitesresult.md)
