Authentication for steam and gamesparks via online subsystem

I’m having trouble authenticating my game on game sparks, I am using Unreal’s online subsystem to get an auth token from steam, but I need to convert it from FString to Hex for game sparks to accept it. Here’s what I have so far:

FString USteamHelper::GetSessionTicket()
{
IOnlineSubsystem* OnlineInterface;
OnlineInterface = IOnlineSubsystem::Get();
FString SessionTicket = OnlineInterface->GetIdentityInterface()->GetAuthToken(0);
int TicketLength = SessionTicket.GetAllocatedSize();
FString HexSessionTicket = SessionTicket.FromHexBlob(*SessionTicket, TicketLength);
return HexSessionTicket;
}


Error C2664 'FString FString::FromHexBlob(const uint8 *,const uint32)': cannot convert argument 1 from 'const TCHAR *' to 'const uint8 *'

Any help would really be apreciated

Hi ShinyBlade777,

The string you get from GetAuthToken is already a hex-encoded string; you don’t need to convert it to hex. You do need to check if it’s valid (not .IsEmpty()) though, as GetAuthToken will return an empty string it can’t generate an auth ticket.

Ok, Thank you, that helps. One step closer to the answer as to why it wont authenticate. It is getting a ticket, I can hook up a print string to it, and it puts out a string, so if its already the right format, there must be an issue elsewhere.