# Epic Online Services SendInvite Not Triggering

**URL:** <https://forums.unrealengine.com/t/epic-online-services-sendinvite-not-triggering/568415>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 28, 2022, 5:20am UTC](https://forums.unrealengine.com/t/epic-online-services-sendinvite-not-triggering/568415 "2022-05-28T05:20:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arjun-kapoor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@arjun-kapoor](https://forums.unrealengine.com/u/arjun-kapoor)\
**Post date:** [May 28, 2022, 5:20am UTC](https://forums.unrealengine.com/t/epic-online-services-sendinvite-not-triggering/568415/1 "2022-05-28T05:20:34Z")

</div>

Hi, I am trying to send an invite to a friend using the Epic Online Services (EOS) in Unreal Engine 5. But the OnInviteSendComplete Callback never gets called!

```auto
void UAzadGameInstance::SendInvite(FString FriendIDString)
{
    if (bIsLoggedIn)
    {
        if (OnlineSubsystem)
        {
            if (const IOnlineFriendsPtr FriendsPtr = OnlineSubsystem->GetFriendsInterface())
            {
                const FUniqueNetId* FriendID = new FUniqueNetIdString(FriendIDString);
                UE_LOG(LogTemp, Warning, TEXT("SENDING INVITE TO: %s"), *FriendIDString);
                FriendsPtr->SendInvite(0, *FriendID, FString(""), FOnSendInviteComplete::CreateUObject(this, &UAzadGameInstance::OnInviteSendComplete));
            }
        }
    }
}

void UAzadGameInstance::OnInviteSendComplete(int32 LocalUserNum, bool bWasSuccessful, const FUniqueNetId& FriendId, const FString& ListName, const FString& ErrorStr)
{
    UE_LOG(LogTemp, Warning, TEXT("OnInviteSendComplete: %d"), bWasSuccessful);

    if (bWasSuccessful)
    {
        UE_LOG(LogTemp, Warning, TEXT("INVITE SUCCESSFULLY SENT TO: %s"), *FriendId.ToString());

        if (OnlineSubsystem)
        {
            if (const IOnlineFriendsPtr FriendsPtr = OnlineSubsystem->GetFriendsInterface())
            {
                FriendsPtr->ClearOnOutgoingInviteSentDelegates(0, this);
            }
        }
    }
    else
    {
        UE_LOG(LogTemp, Warning, TEXT("INVITE SENT ERROR: %s"), *ErrorStr);
    }
}

```

I am not sure what I could be doing wrong! Maybe I am missing some settings or something.

```auto
FriendsPtr->SendInvite(0, *FriendID, FString(""), FOnSendInviteComplete::CreateUObject(this, &UAzadGameInstance::OnInviteSendComplete));

```

returns false

I looked at the documentation but it doesn’t really say why SendInvite() is not triggering successfully, If anyone has worked with EOS before or/and have an idea where/what I should look for that would be great, thanks😄

Edit: I even tried using SendSessionInviteToFriend() but that also returns 0.

```auto
void UAzadGameInstance::SendSessionInviteToFriend(FString FriendIDString)
{
	if (bIsLoggedIn)
	{
		if (OnlineSubsystem)
		{
			if (const IOnlineSessionPtr SessionPtr = OnlineSubsystem->GetSessionInterface())
			{
				const FUniqueNetId* FriendID = new FUniqueNetIdString(FriendIDString);

				if (SessionPtr.IsValid())
				{
					UE_LOG(LogTemp, Warning, TEXT("SENDING INVITE TO: %s"), *FriendID->ToString());
					bool b = SessionPtr->SendSessionInviteToFriend(0, GlobalSessionName, *FriendID);
					UE_LOG(LogTemp, Warning, TEXT("%d"), b);
				}
			}
		}
	}
}

```
