14

As the project seems deprecated somehow, is there any other solution?

Paul van Assen wrote a library (https://github.com/pvanassen/steam-api) which helps to login and other interacting things with steam.

The only thing that isn't working for me is the login part. My login method:

public void login(String cookies) {
    this.steamService = StoreFactory.getSteamStore(cookies, "[Username]");
    try {
        steamService.getLoginService().login("[Username]", "[Password]");
    } catch (SteamGuardException ex) {
        String steamGuard = JOptionPane.showInputDialog("SteamGuardCode:");
        steamService.getLoginService().loginSteamGuard("[Username]",
                "[Password]", ex.getEmailSteamId(), "[NameOfDeviceInSteamGuard]",
                steamGuard);
    } catch (CapchaException ex) {
        System.out.println(ex.getCapchaUrl());

        String captcha = JOptionPane.showInputDialog("CaptchaCode:");

        steamService.getLoginService().loginCapcha("[Username]",
                "[Password]", ex.getCapchaGid(), captcha);
    } catch (VerificationException e) {
        System.out.println("Not working ... \n " + e.toString());
    }
}

My cookie string looks like this:

"Steam_Language=english; steamCountry=[XYZ]; steamLogin=[XYZ]; steamLoginSecure=[XYZ]; sessionid=[XYZ]; webTradeEligibility=[XYZ]; steamRememberLogin=[XYZ]";

If I try to print the error message, all I get is an empty string.

I have now Mobile Authenticator enabled, if this helps!

But other things, for example listing buyable items from the community market, are working with this API.

// Still no solution after a long time =( - what else can I do D:?

Graphican0
  • 167
  • 11

2 Answers2

3

You're not using the cookies. I assume you are trying to use the cookies here: this.steamService = StoreFactory.getSteamStore(addCookies, "[Username]");. Here the variable is called addCookies instead of cookies.

  • Nah, that cannot be the problem. addCookies was a static variable with the start cookies in it (like the one above). Just forgot to change it here. – Graphican0 Jan 08 '16 at 21:23
0

Instead of using a deprecated project, it would be best to look at Steam's APIs. You can view those here. Apparently they use OpenID for authentication, and they have a few other APIs you can use.

There is nothing wrong with writing your own Java implementation using standard HTTP calls.

Logan B. Lehman
  • 4,867
  • 7
  • 32
  • 45
  • Yeah, but they are limited as you can see: https://developer.valvesoftware.com/wiki/Steam_Web_API - and these are not the interfaces I want. So I am looking for an API that is preprogrammed. It takes me too much time figuring out the needed HTTP calls (additionally: I got the same result in the classes of pvnassen - and there it isn't working, too) – Graphican0 Jan 20 '16 at 16:14
  • Understood completely. You could always change the source code to match the current HTTP structure if that is the problem. Have you tried debugging the source code on the Java wrapper? Are there any other alternative Java wrappers that could help you? – Logan B. Lehman Jan 20 '16 at 17:24
  • Yep, did it - found nothing. - And this is because I am searching for another alternative =D! – Graphican0 Jan 20 '16 at 17:37