UE::Online::GetServices() always return invalid pointer

I am using UE 5.2. The new framework Online Services is recommended to use. I followed the documentation, but I am failing in the first step → retrieving Online Services:

First I tried with Steam. It didn’t work. Now I am trying the same with Null

	UE::Online::IOnlineServicesPtr OnlineServicesPtr = UE::Online::GetServices(UE::Online::EOnlineServices::Null, NAME_None);
	if (!OnlineServicesPtr.IsValid())
	{
		GEngine->AddOnScreenDebugMessage(
			-1,
			60.f,
			FColor::Yellow,
			TEXT("OnlineServices invalid")
		);
		return;
	}

!OnlineServicesPtr.IsValid() is always true.

I’ve added this to DefaultEngine.ini:

[OnlineServices]
DefaultServices=Null

[/Script/Engine.OnlineEngineInterface]
bUseOnlineServicesV2=true

Any ideas about what I’m doing wrong?

Necroing this because I am in the same position.

Do it like this:

const UE::Online::IOnlineServicesPtr Services = UE::Online::GetServices();

and add this modules to your Build.cs


PublicDependencyModuleNames.AddRange(new string[] 
{ 
"CoreOnline", 
"OnlineServicesNull",
 "OnlineServicesEOS",
 "OnlineServicesInterface", 
"Core", 
"CoreUObject", 
"Engine",
 "InputCore" 
});

I appreciate the reply! Although I am just now seeing it.
I had put a pin in this altogether.
I ended up trying some things with Steams SDK…and from that moment it seemed like that will likely be the solution I end up with using just by way of usability.
When I get back around to this I’ll give it another go with your advice.