How to expose this: SteamUser()->GetAuthSessionTicket() to BP?

What’s the return type of GetAuthSessionTicket()? If it is something you can’t translate to a blueprint type with a UPROPERTY() then you can define your own wrapper struct and put it in there so you can handle it through C++ functions that use your struct but are exposed to blueprint.

Alright, I’m flailing around not succeeding here.

I am trying to get access to the AuthSessionTicket from Steam (using the SteamPlugin in 4.13) and expose that to Blueprints.

Sounds simple enough, but I am missing something fundamentally. This is my first time I’ve messed around with this sort of stuff and it’s been a headache for the past few weeks.

Any help would be greatly appreciated, thanks!

It’s an FString. And it should be easily translated. The problem is access. I am unable to get the function properly.

Oh I see. I’m afraid I can’t help here then since I’ve never used the Steam Online Subsystem. Good luck with this!

So, I think I figured out the one of the problems. In one project I had been using the Steamworks SDK directly, and so had access to SteamUser(), but in 4.13, I have been trying to use the OnlineSubsystem plugins.

Regardless, if I try to use the IOnlineSubsystem and GetAuthToken, it doesn’t work.

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "GameFramework/Character.h"
#include "Online.h"
#include "MyCharacter.generated.h"

class IOnlineSubsystem;
class FOnlineSubsystemSteam;

UCLASS()
class STEAMAUTHTEST_API AMyCharacter : public ACharacter
{
	GENERATED_BODY()

public:
	// Sets default values for this character's properties
	AMyCharacter();

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
	
	// Called every frame
	virtual void Tick( float DeltaSeconds ) override;

	// Called to bind functionality to input
	//virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;


	IOnlineSubsystem* iOnline = IOnlineSubsystem::Get();

	UFUNCTION(BlueprintCallable, Category = "Steam")
	FString GetSessionTicket(class APlayerController* PlayerController);
	
	//FOnlineSubsystemSteam->GetIdentityInterface()->GetAuthToken()
};

// Fill out your copyright notice in the Description page of Project Settings.

#include "SteamAuthTest.h"
#include "OnlineSubsystem.h"
#include "MyCharacter.h"


// Sets default values
AMyCharacter::AMyCharacter()
{
 	// Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

}

// Called when the game starts or when spawned
void AMyCharacter::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void AMyCharacter::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );

}

FString AMyCharacter::GetSessionTicket(class APlayerController* PlayerController)
{
	FString SessionTicket = iOnline->GetIdentityInterface()->GetAuthToken(int32 PlayerController);
	return SessionTicket;
}

I figured it out, using a different way: How to Get Steam Session Ticket - YouTube

I’ve seen your video,it’s very enlightening.But do you have any idea on how to use the Encrypted Application Tickets in SteamSDK?I already generate the Encrypted App Ticket Key in Steamwork,but i don’t know how to use it.I’m really confusing on this.Looking forward to your reply,Thank you.