我试图从 CS2 获取某人的个人资料库存,但不断遇到 403 错误。我需要在哪里放置 API 密钥吗?
try {
URL url = new URL("https://steamcommunity.com/profiles/"+ steamID+ "/inventory/json/730/2");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
int statusCode = conn.getResponseCode();
if(statusCode != HttpURLConnection.HTTP_OK) {
throw new IOException("Received non-OK response from server");
}
} ...
当我通过浏览正常访问该链接时,没有问题。
Öğrenci Gündemi, öğrencilere yönelik kapsamlı bilgi paylaşımları sunar。 KPSS、YKS、LGS'den çıkmış sorular, ders notları ve daha fazlası için doğru adres.