The Custom Invites Interface requires SDK 1.14.1 or higher.
The Custom Invites interface is designed to allow titles to use the built-in Epic Online Service (EOS) Connect messaging to send and receive invites with an arbitrary payload. This should be considered the only viable invite interface for titles which already have an existing, robust invitation system and want users to be able to integrate sending and receiving those invites through the Epic Account Services (EAS) Social Overlay UI.
For the purposes of the Epic Games Store, Epic Games Launcher, and Social Overlay, Custom Invites are transported and delivered identically to Session and Lobby invites. When the Store or Launcher receives a Custom Invite, it will prompt the user with UI indicating the Sender and Game, and if a player accepts the invitation the associated product/game will be started.
Sending a Custom Invite
Prepare Custom Invite Payload
A Custom Invite Payload is an FString that may be no longer than EOS_CUSTOMINVITES_MAX_PAYLOAD_LENGTH
characters (currently 500). Its contents are opaque to the SDK and are delivered as-is to the receiving user.
Set Custom Invite Payload
Before attempting to send a Custom Invite or allow the local player to use the Social Overlay to send a Custom Invite, use the EOS_CustomInvites_SetCustomInvite
to set the Custom Invite Payload. All calls to EOS_CustomInvites_SendCustomInvite
and all Invitations initiated by the player via the “INVITE” button in the Overlay will use this payload.
Send Custom Invite via EOSSDK
Once a payload has been set, you can use EOS_CustomInvites_SendCustomInvite
to send an invite to the specified user or group of users.
Send Custom Invite via Social Overlay
Whenever a Custom Invite Payload has been set via EOS_CustomInvites_SetCustomInvite
, the Social Overlay will allow the local player to use the “Invite” button to send an invite with the currently set Custom Invite Payload to their friends.
For more information on the Social Overlay, see the Social Overlay and SDK integration documentation.
Processing a Custom Invite
Note: The EOS Overlay is installed by the Epic Games Launcher. Game applications can also install it as part of their prerequisites using the EOS service redistributable installer. For more information on custom invites in the Social Overlay, see the Social Overlay and SDK integration documentation.
Callback - Custom Invite Received
Using the EOS_CustomInvites_AddNotifyCustomInviteReceived
and EOS_CustomInvites_RemoveNotifyCustomInviteReceived
functions will allow you to perform your own detection, custom UI indication, and processing of custom invites. These should be called prior to Logging in, as the act of logging in and initializing can discover pending custom invites which will generate immediate notifications.
Once a custom invite has been handled (accepted or rejected by the user), you must call
EOS_CustomInvites_FinalizeInvite
to remove it from both the internal SDK and the Social Overlay’s awareness.
Policy Configuration
You will need to configure your client policy permissions to use a Custom policy that enables the Notification service with userRequired and allow:
sendCustomInviteToAnyUser
: Allows the user to send a custom invite to any user.