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

# XGameActivationAcceptPendingInvite

> XGameActivationAcceptPendingInvite

# XGameActivationAcceptPendingInvite

Accepts a pending game invite.

## Syntax

```cpp theme={null}
HRESULT XGameActivationAcceptPendingInvite(  
         const char* inviteUri  
)  
```

### Parameters

*inviteUri*   \_In\_z\_\
Type: const char\*

The invite URI received from an [XGameActivationCallback](/reference/system/xgameactivation/functions/xgameactivationcallback) with an activation type of `XGameActivationType::PendingGameInvite`.

### Return value

Type: HRESULT

HRESULT success or error code.\
For a list of error codes, see [Error Codes](/reference/errorcodes).

## Remarks

Call **XGameActivationAcceptPendingInvite** after the user has accepted a pending game invite. When a `PendingGameInvite` activation is received through the [XGameActivationCallback](/reference/system/xgameactivation/functions/xgameactivationcallback), the game should present UI to allow the user to accept or reject the invite. If the user accepts, call this function with the `inviteUri` from the [XGameActivationInfo](/reference/system/xgameactivation/structs/xgameactivationinfo) structure. This triggers a subsequent activation callback with the `AcceptedGameInvite` type.

For an example of handling pending invites, see the remarks section of the [XGameActivationCallback](/reference/system/xgameactivation/functions/xgameactivationcallback#remarks) topic.

## Requirements

**Header:** XGameActivation.h

**Library:** xgameruntime.lib

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

## See also

[XGameActivation](/reference/system/xgameactivation/xgameactivation_members)

[XGameActivationCallback](/reference/system/xgameactivation/functions/xgameactivationcallback)


## Related topics

- [XGameActivation](/reference/system/xgameactivation/xgameactivation_members.md)
- [XGameActivationInfo](/reference/system/xgameactivation/structs/xgameactivationinfo.md)
- [XGameActivationType](/reference/system/xgameactivation/enums/xgameactivationtype.md)
- [Handle protocol activation with Multiplayer Manager](/services/xbox-services/multiplayer/mpm/how-to/live-handle-protocol-activation.md)
- [Handling protocol activation (flowchart)](/services/xbox-services/multiplayer/mpm/concepts/flowcharts/live-mpm-on-protocol-activation.md)
