gpt4 book ai didi

java - Steam API 登录无效 - 还有其他方法吗?

转载 作者:搜寻专家 更新时间:2023-10-30 19:46:58 24 4
gpt4 key购买 nike

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

Paul van Assen 编写了一个库 ( https://github.com/pvanassen/steam-api ),它有助于登录和其他与 Steam 的交互。

唯一对我不起作用的是登录部分。我的登录方式:

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());
}
}

我的 cookie 字符串如下所示:

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

如果我尝试打印错误消息,我得到的只是一个空字符串。

我现在已经启用了移动身份 validator ,如果这有帮助的话!

但其他事情,例如从社区市场列出可购买的元素,也适用于此 API。

//搞了半天还是没有解决 =( - 我还能怎么办 D:?

最佳答案

您没有使用 cookie。我假设您正在尝试使用此处的 cookie:this.steamService = StoreFactory.getSteamStore(addCookies, "[用户名]");。这里变量被称为 addCookies 而不是 cookies

关于java - Steam API 登录无效 - 还有其他方法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34360221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com