mkojic avatar image
mkojic asked

Cannot login with Steam. Error: Steam WebAPI error: 102 (Ticket for other app)

Hi, in Steamworks dashboard I have generated a WebAPI Key for default "Everyone" group, imported PlayFab SDK and Steamworks.NET plugins into my Unity project, and set up Steam under "Add-ons" by providing both the Steam App ID and Steam WebAPI key.

When I trigger "LoginWithSteam" function it triggers the resultCallback so everything works as expected. However, since I cannot get Steam overlay to show up, even though I get resultCallback success when I trigger both StartPurchase and PayForPurchase I decided to created an empty Unity project to test Steam IAPs and see if it's gonna work if I start from scratch.

So in an empty Unity project and I have installed SDKs, and used the same code like before but now I cannot login to Steam as I keep getting: "Failed PlayFabClientAPI.LoginWithSteam: /Client/LoginWithSteam: Steam WebAPI error: 102 (Ticket for other app)".

This is the code I use:

    //login with steam
    PlayFabClientAPI.LoginWithSteam(new LoginWithSteamRequest
                CreateAccount = true,
                SteamTicket = GetSteamAuthTicket()
            }, OnComplete, OnFailed);
    //get auth ticket
    public string GetSteamAuthTicket()
        byte[] ticketBlob = new byte[1024];
        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();

I have tried creating a new group on Steamworks and generating a new WebAPI key, but LoginWithSteam throws the same error. I have also tried creating a new PlayFab account and getting a new title id but still no luck. What am I doing wrong here? Thanks!

10 |1200

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

1 Answer

brendan avatar image
brendan answered

The only way you can get that error is if the ticket submitted does not match the Steam app configured in the Steam Add-ons page of your Title ID in the PlayFab Game Manager. Can you have a look at that and confirm how it was set up?

10 |1200

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

mkojic avatar image mkojic commented ·

Hi @Brendan, is it possible to use the same PlayFab TitleID and Studio details in two different projects?

What I have now is two Unity projects where I have provided the same Studio and TitleID. In the first project everything works fine, but in the second one I keep getting "Failed PlayFabClientAPI.LoginWithSteam"... First I thought that I might have provided wrong configuration details in my second project, but I have the same configuration in both projects so it's strange that Steam login does not work in the second one.

This is a summary of what I did:

- Installed all SDKs (PlayFab SDK + Unity Editor extension, Stemworks.NET)

- Provided the same TitleID in both projects

- Logged in to my account using Unity Editor extension (and can see my Studio and TitleID)

In the first project I get success on login and in the second one it says login failed. What could the issue? Thanks!

0 Likes 0 ·
brendan avatar image brendan mkojic commented ·

Yes, you can use the same Title ID across as many projects as you want to. What is the complete response body of the error from the login call?

0 Likes 0 ·
mkojic avatar image mkojic commented ·

This is the complete error message I get:

ErrorMessage: Steam WebAPI error: 102 (Ticket for other app)
SteamScript:OnFailed(PlayFabError) (at Assets/Scripts/Steamworks.NET/SteamScript.cs:53)
PlayFab.Internal.<MakeApiCall>c__AnonStorey3:<>m__0(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:152)
PlayFab.Internal.<PostPlayFabApiCall>c__Iterator1:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:208)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

And this is the entire PlayFabError object:


0 Likes 0 ·
playfaberror.png (15.1 KiB)
brendan avatar image brendan mkojic commented ·

So, the only way you could get this is if a) the Steam App ID isn't correct in the PlayFab configuration, or b) the Steam Web API Key isn't correct in the PlayFab configuration. What is the Title ID of the game where you're seeing this, and can you add me ( to your title in Steamworks?

0 Likes 0 ·
mkojic avatar image mkojic commented ·

My Title ID is: 3CBE. Could you please send me your Steam account name? It does not allow me to add you with your email only. Thanks!

0 Likes 0 ·
brendan avatar image brendan mkojic commented ·

Yes, it's "playfab_brendan".

0 Likes 0 ·
mkojic avatar image mkojic brendan commented ·

Thanks, I just added you to our title in Steamworks.

0 Likes 0 ·
Show more comments
ben-1 avatar image ben-1 commented ·

I've just come across this error too - for some reason, our secret key reset?

I spent about 30 minutes trying to change the secret key on the PlayFab Game Manager, however it kept resetting to the old one - eventually I tried logging in again, and it worked, however it's still showing the wrong secret key.

The key didn't have an expiration date, and it reset at what appears to be exactly midnight UTC.

Any idea what's going on?

0 Likes 0 ·
brendan avatar image brendan ben-1 commented ·

I'm not sure what you're describing. The PlayFab Secret Key for a title is completely unrelated to the Steam API calls (which is what this thread was about). Are you talking about the Steam Web API key? That's set in the add-ons tab in your title. Changing it there is a permanent action - it cannot change back. What is your Title ID? Can you provide a link to the page with the Key you're talking about?

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.