question

duartedd avatar image
duartedd asked

linksteamid api check for steamid exist first

Hey

I am having an issue where the Linksteamid api call is returning an invalid ticket on the call sometimes

I am thinking maybe its a limiter by steam on the speed of which a request for authentication can be made

Steam API AuthenticateUserTicket error response: {"response":{"error":{"errorcode":101,"errordesc":"Invalid ticket"}}} for authentication ticket 14000000ce47003d22e26014295f990201001001aec21f611800000001000000020000006338c819f0df31c48f950e000c000000b20000003200000004000000295f990201001001ac0b16009427929c0adea8c00000000036a81e61b6573a61010053c10700000000005dc0e82401c847a6339a7c80f37d4fbaf008fd634c44fb42dfdf739009b48b422d2bd52b0f25933d286181d38b0ed6a407b03907fe99e1f2b4ed5a035d3a4fe842c02b836554d73691de4f5468d5b88b64e8237386be695823302c46609ddd483ed022a5dabe1e8d10a476e4b9b18d41855bd95c35c10937a18880a1b6865d2f

I think you guys made it so that when you linksteamid you actually make the call first to steam then check after to see if its linked to another account....this is where my problem lies....when i receive that already linked error message back then i can say okay please login so you can recover your account....problem with that is ...welll they cant login now cause of the invalid ticket

thoughts? seen this ?

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

Can it be reproduced constantly? Would you share code snippets with us? Please note to remove private information.

0 Likes 0 ·

1 Answer

·
duartedd avatar image
duartedd answered

Hey

here is the code provided by you guys - creates the ticket then i call the steam api call to link up and such - i changed to a higher byte size from 1024 as recommended by steam support but didnt help they also stated that its possible that the callback is not being waited for long enough - problem with that is that PF takes care of that all and i wait for the callback from the LinkSteamAccount - so that was the issue - basically gotta make sure that callback is completed FIRST Thennn the PF API CALL can be done otherwise there is a chance that the ticket may not get to steam before PF makes the call.

thanks!

Daniel

    public static string GetSteamAuthTicket()
    {
        byte[] ticketBlob = new byte[16384];
        uint ticketSize;


        // Retrieve ticket; hTicket should be a field in the class so you can use it to cancel the ticket later
        // When you pass an object, the object can be modified by the callee. This function modifies the byte array you've passed to it.
        HAuthTicket hTicket = SteamUser.GetAuthSessionTicket(ticketBlob, ticketBlob.Length, out ticketSize);


        // Resize the buffer to actual length
        Array.Resize(ref ticketBlob, (int)ticketSize);


        // Convert bytes to string
        StringBuilder sb = new StringBuilder();
        foreach (byte b in ticketBlob)
        {
            sb.AppendFormat("{0:x2}", b);
        }
        return sb.ToString();
    }
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

Would you also share the login related code snippet? Have you checked Brendan's answer in this thread: How do I convert the Steam Session Ticket for sign-in with PlayFab? - Playfab Community?

0 Likes 0 ·
duartedd avatar image duartedd Seth Du ♦ commented ·

ya all good - the issue was the wait for callback portion - i needed to wait for the steam auth callback before calling the login or link api calls - the tricky part was waiting on the callback and THEN calling the login or link api calls depending on what the customer chooses ( i just ended up using an static variable saying ifLinkSteam = true call link function if login api - call the login function - all good now thanks!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.