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

# XGameUiShowSendGameInviteAsync

> XGameUiShowSendGameInviteAsync

# XGameUiShowSendGameInviteAsync

This method shows a picker UI populated from the selected player's friend list and suggested friend list to send out game invites.

## Syntax

```cpp theme={null}
HRESULT XGameUiShowSendGameInviteAsync(  
         XAsyncBlock* async,  
         XUserHandle requestingUser,  
         const char* sessionConfigurationId,  
         const char* sessionTemplateName,  
         const char* sessionId,  
         const char* invitationText,  
         const char* customActivationContext  
)  
```

### Parameters

*async*   \_In\_<br />Type: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

A pointer to the [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) that is passed to [XAsyncRun](/reference/system/xasync/functions/xasyncrun).

*requestingUser*   \_In\_<br />Type: XUserHandle

A handle to the user that is sending the invites.

*sessionConfigurationId*   \_In\_<br />Type: char\*

Specifies a string that indicates the title's service configuration ID.

*sessionTemplateName*   \_In\_<br />Type: char\*

Specifies a string that indicates the name of the multiplayer session template.

*sessionId*   \_In\_<br />Type: char\*

Specifies a string that indicates the ID of the multiplayer session to invite people to.

*invitationText*   \_In\_opt\_<br />Type: char\*

Specifies a string that indicates the custom invitation string ID.<br />This string ID is defined in the XBOX Live service configuration to identify the invitation text that is additional to the standard invitation text. The ID string must be prefixed with "///". Pass an empty string if you don't want a custom string added to the invite.

*customActivationContext*   \_In\_opt\_<br />Type: char\*

The custom activation context that is available to the invitee in the activation URI for an invite. The custom activation context string must be URL-safe and binary content should be encoded with URL-safe base64 encoding. The maximum length is 160 characters.

### Return value

Type: HRESULT

HRESULT success or error code of the async call.

## Remarks

Once the list is populated players can be selected. The player can send an invitation to play a game and/or party chat for a specified game session to individuals selected in the picker UI.

Calling for UI will cause your game to enter *constrained mode*. In constrained mode your title will receive fewer system resources while it is in the background of the UI that has been called for. To learn more about constrained mode and other operational modes for your title read [XBOX Game Life Cycle (NDA topic)](/build/console-features/console-workflows/xbox-game-life-cycle).

## Requirements

**Header:** XGameUI.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, Steam Deck, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Asynchronous programming design goals and improvements](/build/core-features/common/async/async-whitepaper)
* [Sending invites](/services/xbox-services/multiplayer/invites/how-to/live-invites-send)

## See also

[XGameUI](/reference/system/xgameui/xgameui_members)<br />[XGameUiShowSendGameInviteResult](/reference/system/xgameui/functions/xgameuishowsendgameinviteresult)<br />[XBOX Game Life Cycle (NDA topic)](/build/console-features/console-workflows/xbox-game-life-cycle)


## Related topics

- [XGameUiShowSendGameInviteUiCallback](/reference/system/xgameui/functions/xgameuishowsendgameinviteuicallback.md)
- [XGameUiSetSendGameInviteUiResponse](/reference/system/xgameui/functions/xgameuisetsendgameinviteuiresponse.md)
- [Sending invites](/services/xbox-services/multiplayer/invites/how-to/live-invites-send.md)
- [XGameUiUiCallbacks](/reference/system/xgameui/structs/xgameuiuicallbacks.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
