question

nicki avatar image
nicki asked

Cannot resolve Steam WebAPI error 102

Error occurs as a result of calling PlayFabClientAPI.LinkSteamAccount(). The call results in a PlayFabError with InvalidSteamTicket as the type, and the error message says "InvalidSteamTicket Steam WebAPI error: 102 (Ticket for other app).

Relevant details:

As best as I can determine, I am formatting the ticket string correctly (long ass hexadecimal string. ie:

14000000497029023f68ce256a11f90101001001d15f355b180000000100000002000000678d33426701a8c0acf9860622000000b200000032000000040000006a11f90101001001e0010000678d33426701a8c00000000058ba335bd8694f5b010000000000000000008f005d8f275295d1f51d2e24930fdc98fa005808c06eb47703e1d0fa0fe37b4c24d07c2b359d2c8c6c38d1f5fe65f08c08a713e3cf99cec39f227efe756f4f412826bfc96ef22da249a9827beff940333bef8f51352f055f858555fbb866f3299087c09fdd44a40bbdff7a2f2e6956497edd9da0678ef44d7752b226d1cce545

We are using the Facepunch.Steamworks library, which is correctly detecting the running instance of steam.

The 'Steam Application ID' and the 'Steam Web API Key' for our titleappear to be correct.

The Steam Application ID value also matches what is passed to FacePunch.SteamWorks, and what is set in our steam_appid.txt file.

We have multiple Playfab servers using the same steam info, our live server and our production server (though live is only being used for beta testing at this time). We have tried setting our client to work with both servers, with no discernable difference.

Suggestions?

apis
10 |1200

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

brendan avatar image
brendan answered

Well first, this is the way to convert their ticket for use with our API calls:

https://community.playfab.com/questions/240/205846468-How-do-I-convert-the-Steam-Session-Ticket-for-sign-in-with-PlayFab-.html

If that's what you're doing, the only reason the Steam service should be returning the 102 error is if the App ID or Web API Key is incorrect in the add-ons page. Are you entering the App ID as hexadecimal or decimal? Can you give me access to the title in Steamworks, so that I can have a look?

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.

brendan avatar image brendan commented ·

Adding this detail here, so that folks don't have to read through the whole thread:

One thing we've noticed is that sometimes the generated Web API Key in Steam simply doesn't work. If you believe you have everything configured correctly, one thing that's worked (for more than a few people) is to simply revoke the Key you're currently trying to use in Steam, generate a new one, and then wait a while before configuring it in PlayFab and testing. We've seen it take up to a day for it to be propagated and working in their service.

0 Likes 0 ·
nicki avatar image
nicki answered

That set up is one I have seen elsewhere, but does not appear to be applicable to the Facepunch.Steamworks library.

My current (and not working) approach looks like this:

public class SteamWrapper : MonoSingleton<SteamWrapper>
{
    public const int appID = <REDACTED>;
    private Facepunch.Steamworks.Auth.Ticket _authTicket;
    public Facepunch.Steamworks.Client Client
    {
        get { return Facepunch.Steamworks.Client.Instance; }
    }
    void Start()
    {
        DontDestroyOnLoad(gameObject);
        Facepunch.Steamworks.Config.ForUnity(Application.platform.ToString());

        //initializes the facepunch singleton instance
        var tmp = new Facepunch.Steamworks.Client(appID);
        if (Facepunch.Steamworks.Client.Instance != null)
        {
            _authTicket = Client.Auth.GetAuthSessionTicket();
        }
    }
    
    public string GetSteamAuthTicket()
    {
        // Convert bytes to string
        StringBuilder sb = new StringBuilder();
        foreach (byte b in _authTicket.Data)
        {
            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.

brendan avatar image brendan commented ·

What Title ID is this for? Can you confirm that the Steam add-on configuration page has been set with the correct App ID and Web API Key? If so, please try removing the Web API Key, generating a new one in the Steamworks site, and entering it, then re-testing. We have seen that for some reason, occasionally the Web API Key they provide fails to work correctly.

0 Likes 0 ·
nicki avatar image nicki commented ·

This is currently being used with Playfab id 2139.

We tried revoking and regenerating the web API key on Friday.

0 Likes 0 ·
nicki avatar image
nicki answered

This is currently being used with Playfab id 2139.

We tried revoking and regenerating the web API key on Friday.


5 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.

brendan avatar image brendan commented ·

Can you please add me (PlayFab_Brendan) to your title in Steamworks, so that I can have a look?

0 Likes 0 ·
nicki avatar image nicki brendan commented ·

You should be added. Not sure if you are seeing the e-mails from my boss (martin@traega.com)

0 Likes 0 ·
brendan avatar image brendan nicki commented ·

I still don't have access to the Manage Groups page, which is what I'd need to check on the Web API Key. Can you check on that?

0 Likes 0 ·
Show more comments

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.