> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lobby.SendInvite

> Lobby.SendInvite

## Method (1 of 2)

Send an invite to this lobby from the local user to the invited entity.

```csharp theme={null}
public void SendInvite(PFEntityKey sender, PFEntityKey invitee)
```

| parameter | description |
| - | - |
| sender | The local user sending the invite. |
| invitee | The invited entity. |

## Remarks (1 of 2)

This is an asynchronous operation. Upon successful completion, the title will be provided a [`OnLobbySendInviteCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbySendInviteCompleted) with the `OnLobbySendInviteCompleted result` field set to [`Success`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyError/Success). Upon a failed completion, the title will be provided a [`OnLobbySendInviteCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbySendInviteCompleted) with the `OnLobbySendInviteCompleted result` field set to a failed error code.

The *sender* must be a local user of this lobby which joined from this client.

***

## Method (2 of 2)

Send an invite to this lobby from the local user to the invited entity.

```csharp theme={null}
public void SendInvite(PlayFabAuthenticationContext sender, PFEntityKey invitee)
```

| parameter | description |
| - | - |
| sender | The local user sending the invite. |
| invitee | The invited entity. |

## Remarks (2 of 2)

This is an asynchronous operation. Upon successful completion, the title will be provided a [`OnLobbySendInviteCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbySendInviteCompleted) with the `OnLobbySendInviteCompleted result` field set to [`Success`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyError/Success). Upon a failed completion, the title will be provided a [`OnLobbySendInviteCompleted`](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbySendInviteCompleted) with the `OnLobbySendInviteCompleted result` field set to a failed error code.

The *sender* must be a local user of this lobby which joined from this client.

## See Also

* class [PFEntityKey](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PFEntityKey/overview.md)
* class [Lobby](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/Lobby/overview.md)
* namespace [PlayFab.Multiplayer](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference.md)


## Related topics

- [PlayFabMultiplayer.OnLobbySendInviteCompleted](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/PlayFabMultiplayer/OnLobbySendInviteCompleted.md)
- [PFLobbySendInviteCompletedStateChange](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbysendinvitecompletedstatechange.md)
- [PFLobbySendInvite](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbysendinvite.md)
- [Use lobby and matchmaking together](https://docs.xbox.com/services/playfab/multiplayer/lobby/lobby-and-matchmaking.md)
- [Enable playing a multiplayer game with friends by using Multiplayer Manager](https://docs.xbox.com/services/xbox-services/multiplayer/mpm/how-to/live-play-multiplayer-with-friends.md)
