Epic Online Services

An guide to the Online services „Epic Online Services“ and „Online Subsystem“ by Epic Games®

Updated over 3 years ago
  • Introduction

    Guide is, among other sources, inspired by Sneaky Kitty Game Dev's tutorial series on Epic Online Services, purpose is to combine knowledge over here and convey it in written language.

Setup

First of all you will have to download Epic Online Services SDK, type is programming language „C“, version preferably the latest. Subsequently extract the Zip on your Desktop, open the Samples.sln with your favourite Integrated Development Environment, build AuthAndFriends. After that unfold AuthAndFriends and lookout for SampleConstants.h.

Now go to Developer Portal, click Create Product, name it whatever you want. Click on your newly created Product and head down to Product Settings, there you see three IDs & your GameName. Paste your Product ID, Sandbox ID, Deployment ID & GameName, step by step into SampleConstants.h. Client Credentials ID & ClientCredentialsSecret remains blank, it's going to be generated in the next step.

In your Product Settings tab, click on Clients, look for Client Policies. Click Add New Client Policy, name it whatever you want. As your Client Policy Type pick Custom, its advisable to enable User required, check all selectable features as well as allowed actions. Next up, Add New Client, in the Client Policy field pick the one you just created, other option(s) can be ignored still.

Once again in the Developer Portal, on the left side, click Epic Account Services. If there is no Application created already, create one. Click on Permissions, enable Online Presence and Friends. After that click on Linked Clients, pick your Client.

Return to your Samples.sln, press Debug — an AuthAndFriends window should appear. On the right side click Account Portal → Log In. An web page is going to pop-up and request Permission, click Continue to App and Allow. Done! All the just taken steps confirm us that our product and all the needed information is working & ready, we can now move on to the next point.

Epic Online Services

For the sake of making life easier I've created an basic downloadable Epic Online Services project prototype which has login implemented already, it gives you a decent head start to begin tinkering. In order to get the project started you have to fill out the missing SDK Credentials in DefaultEngine. Once opened try it out and press Play to Login.

Authentication (Optional)

At this section we are going to use the Developer Authentication Tool to make the login process less repetitive, result will be that Epic Games remembers your account thus you wont have to Login everytime you press Play to test out new functions. It's a time-saver method basically.

Open the Dev Auth Tool you find in the Epic Online Services project prototype folder. For Port use „8081“, Login, pick an name, you will use that name here & in the future, so remember it.

You will have to edit that piece of code..

void UEOSGameInstance::Login()
{
	if (OnlineSubsystem)
	{
		if (IOnlineIdentityPtr Identity = OnlineSubsystem->GetIdentityInterface())
		{
			FOnlineAccountCredentials Credentials;
			Credentials.Id = FString("");
			Credentials.Token = FString("");
			Credentials.Type = FString("accountportal");

			Identity->OnLoginCompleteDelegates->AddUObject(this, &UEOSGameInstance::OnLoginComplete);
			Identity->Login(0, Credentials);
		}
	}
}

Complete Credentials.Id = FString();, to Credentials.Id = FString("127.0.0.1:8081");, complete Credentials.Token = FString("YourName"); with your name, replace Credentials.Type = FString("accountportal"); with Credentials.Type = FString("developer");.

EOSPlus

Epic Online Services plus Identity Provider (Steam, Amazon, Apple, Discord..) is an extension which lets you use one additional online service on top of Epic Online Services, its being used for grabbing friends across the board for example, but for other tasks as well.

Open your Developer Portal go to Product Settings → Identity Providers. Add Identity Provider, pick Steam, as description go with whatever you want, Encryption Key is ed9386073647cea58b7721490d59ed445723f0f66e7414e1533ba33cd803bdbd, App ID is 480.

Identity Provider.jpg

Move from Identity Providers to Environments click on Identity Providers, scroll down and pick Steam Identity Provider.

Create Session

Soon..

Help

You are seeking support on getting Epic Online Services and & or Online Subsystem running for your game? EOS Help or Unreal Slackers, Forums, AnswerHub, Sneaky Kitty Tutorials, Flopperam & The Aphix Community can be your go-to!

Code Snippets

In case you are looking out for Code Examples, there a few repositories which make use of or expose Epic Online Services & Online Subsystem, those are EOSYTTutorial, AdvancedSessionsPlugin and OnlineSubsystemUtils.