Steamworks.NET icon indicating copy to clipboard operation
Steamworks.NET copied to clipboard

RequestEncryptedAppTicket won't respond

Open ural89 opened this issue 7 months ago • 2 comments

void Start()
    {
        if (!SteamManager.Initialized)
        {
            Debug.LogError("Steam not initialized");
            return;
        }

        ticketResponseCallback = Callback<EncryptedAppTicketResponse_t>.Create(OnEncryptedAppTicketResponse);

    }
private void Update()
    {
        SteamAPI.RunCallbacks();
    }
void RequestTicket()
    {
        byte[] optionalData = new byte[0]; // If you want to pass any custom data into the ticket
        var requested = SteamUser.RequestEncryptedAppTicket(optionalData, optionalData.Length);
        Debug.Log("RequestEncryptedAppTicket sent: " + requested);
    }

void OnEncryptedAppTicketResponse(EncryptedAppTicketResponse_t callback)
    {
       Debug.Log("Respond received!");
       //some code here
    }

I receive this log: RequestEncryptedAppTicket sent: /Somenumber here/ But I never see Respond received in logs. OnEncryptedAppTicketResponse callback is not calling. What are the possible issues here?

ural89 avatar May 22 '25 07:05 ural89

it seems I was setting callback wrong

OnEncryptedAppTicketResponseCallResult = CallResult<EncryptedAppTicketResponse_t>.Create(OnEncryptedAppTicketResponse);

and set the handle

 SteamAPICall_t handle = SteamUser.RequestEncryptedAppTicket(userData, userDataLength);

        if (handle == SteamAPICall_t.Invalid)
        {
            Debug.LogError("RequestEncryptedAppTicket failed to initiate. Is Steam running/initialized properly?");
            return;
        }
        OnEncryptedAppTicketResponseCallResult.Set(handle);

Now if I test this for SpaceWar it works. But when I set the steam_appid.txt to my game it will directly returnFailed to get encrypted ticket. Result: k_EResultFailwithout sending to backend.

ural89 avatar May 22 '25 13:05 ural89

I've been having the same problem - every time I get a failure when requesting the app ticket. Does anyone out there have this working?

joebain avatar Nov 12 '25 09:11 joebain