diff --git a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs index dded369fb97b1..af4d1e5d87440 100644 --- a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs @@ -2365,7 +2365,7 @@ internal async Task UnpackBooster(uint appID, ulong itemID) { return (ESteamApiKeyState.AccessDenied, null); } - INode? htmlNode = response.Content.SelectSingleNode("//div[@id='bodyContents_ex']/p"); + INode? htmlNode = response.Content.SelectSingleNode("//div[@id='bodyContents_ex']//p"); if (htmlNode == null) { Bot.ArchiLogger.LogNullError(htmlNode); @@ -2381,6 +2381,10 @@ internal async Task UnpackBooster(uint appID, ulong itemID) { return (ESteamApiKeyState.Error, null); } + if (text.Contains("Your account does not meet the requirements", StringComparison.OrdinalIgnoreCase)) { + return (ESteamApiKeyState.RequirementsNotMet, null); + } + if (text.Contains("Registering for a Steam Web API Key", StringComparison.OrdinalIgnoreCase)) { return (ESteamApiKeyState.NotRegisteredYet, null); } @@ -2695,6 +2699,7 @@ private async Task RefreshSession() { return (true, key); case ESteamApiKeyState.NotRegisteredYet: + case ESteamApiKeyState.RequirementsNotMet: // Registration of key requires active ASF 2FA, or user interaction // Show a warning but don't cache this, we expect this to be temporary Bot.ArchiLogger.LogGenericWarning(Strings.BotWarningNoApiKeyRegistered); @@ -2872,6 +2877,7 @@ private enum ESteamApiKeyState : byte { Timeout, Registered, NotRegisteredYet, - AccessDenied + AccessDenied, + RequirementsNotMet } }