# Steam SendInvite always fails

**URL:** <https://forums.unrealengine.com/t/steam-sendinvite-always-fails/783823>\
**Category:** C++\
**Tags:** Steam, unreal-engine, session, CPP, question\
**Created:** [March 4, 2023, 8:50pm UTC](https://forums.unrealengine.com/t/steam-sendinvite-always-fails/783823 "2023-03-04T20:50:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samathan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/samathan/32/1058905_2.png) [@Samathan](https://forums.unrealengine.com/u/Samathan)\
**Post date:** [March 4, 2023, 8:50pm UTC](https://forums.unrealengine.com/t/steam-sendinvite-always-fails/783823/1 "2023-03-04T20:50:12Z")

</div>

I’m trying to use the SendInvite function to send a game invitation to friends via Steam. But whenever I try to call it, the FOnSendInviteComplete delegate always returns “false” for bWasSuccessful. This is the source code I have for the invite function:

> void UKingdomsGameInstance::SendInviteToPlayer(const FUniqueNetId& PlayerToInvite)  
> {  
> /\* If the friends interface is valid, send an invite to the target player. \*/  
> if (FriendsInterface.IsValid())  
> {  
> FriendsInterface-\>SendInvite(0, PlayerToInvite, EFriendsLists::ToString(EFriendsLists::Default), OnSendInviteCompleteDelegate);  
> }  
> }

The FUniqueNetId is valid, and I have a function called OnSendInviteComplete that is bound to the FOnSendInviteComplete delegate. OnSendInviteComplete is successfully called, but its bWasSuccessful parameter is false, meaning it failed to send the invite. I’ve tried sending it to Steam friends who are online, and I’ve also tried building my project, using another machine and an alternate Steam account, and inviting that player while playing the same project. It always returns “false.”

Is there something I’m missing?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![STRiFE.x](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/strife.x/32/969826_2.png) [@STRiFE.x](https://forums.unrealengine.com/u/STRiFE.x)\
**Post date:** [March 5, 2023, 7:50am UTC](https://forums.unrealengine.com/t/steam-sendinvite-always-fails/783823/2 "2023-03-05T07:50:44Z")

</div>

Just check the source code. SendInvite is not implemented by the Steam Online Subsystem.

```auto
bool FOnlineFriendsSteam::SendInvite(int32 LocalUserNum, const FUniqueNetId& FriendId, const FString& ListName, const FOnSendInviteComplete& Delegate /*= FOnSendInviteComplete()*/)
{
	Delegate.ExecuteIfBound(LocalUserNum, false, FriendId, ListName, FString(TEXT("SendInvite() is not supported")));
	return false;
}

```

---

<div class="post-metadata">

**Author:** ![Samathan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/samathan/32/1058905_2.png) [@Samathan](https://forums.unrealengine.com/u/Samathan)\
**Post date:** [March 7, 2023, 2:13am UTC](https://forums.unrealengine.com/t/steam-sendinvite-always-fails/783823/3 "2023-03-07T02:13:05Z")

</div>

> [@STRiFE.x](#):
>
> SendInvite is not implemented by the Steam Online Subsystem.

Ah, that makes sense. So if I use Steam’s API, would it send them an actual Steam invitation, or could I use a delegate to create my own in-game invitation for the receiver to see?

The ShooterGame example uses SendSessionInviteToFriend, but I don’t think I can use that because I want to connect the player to a beacon, not a session.

---

<div class="post-metadata">

**Author:** ![Burnrate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burnrate](https://forums.unrealengine.com/u/Burnrate)\
**Post date:** [October 22, 2024, 1:28am UTC](https://forums.unrealengine.com/t/steam-sendinvite-always-fails/783823/4 "2024-10-22T01:28:56Z")

</div>

You can still send an invite using the IOnlineSessionPtr Session = Online::GetSessionInterface();  
and Session-SendSessionInviteToFriend

Send Invite in the friends interface is intended to be for inviting someome to be a friend I believe.
