geel9 / SteamAuth

A C# library that provides vital Steam Mobile Authenticator functionality
MIT License
276 stars 102 forks source link

Getting BadSMSCode when trying to add mobile authenticator even though code is correct #32

Closed xagotrunk closed 8 years ago

xagotrunk commented 8 years ago

I've been getting this error every time I try to input the SMS sent to my phone. I've tried different phone numbers and different accounts but I still get this error every time. Did valve change something with adding authenticators?

BlueRaja commented 8 years ago

I am getting the same issue.

Logged the request using Fiddler:

Request

POST https://api.steampowered.com/ITwoFactorService/FinalizeAddAuthenticator/v0001 HTTP/1.1
Accept: text/javascript, text/html, application/xml, text/xml, */*
User-Agent: Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Google Nexus 4 - 4.1.1 - API 16 - 768x1280 Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
Referer: https://steamcommunity.com/mobilelogin?oauth_client_id=DE45CD61&oauth_scope=read_profile%20write_profile%20read_client%20write_client
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Host: api.steampowered.com
Content-Length: 143
Accept-Encoding: gzip, deflate

steamid=76561198116339914&access_token=abcd123etc&activation_code=78214&authenticator_code=&authenticator_time=1453702668

Response

HTTP/1.1 200 OK
X-eresult: 1
Content-Type: application/json; charset=UTF-8
Content-Length: 87
Expires: Mon, 25 Jan 2016 06:17:49 GMT
Date: Mon, 25 Jan 2016 06:17:49 GMT
Connection: keep-alive

{
    "response": {
        "success": false,
        "server_time": "1453702669",
        "status": 89
    }
}

I tried multiple times, I'm certain the SMS code is correct.

Is authenticator_code supposed to be blank? WinAuth appears to always add it. [Edit] I tried editing it to always add the authenticator_code, but still run into the same issue. Hrm.

BlueRaja commented 8 years ago

I also tried SteamDesktopAuthenticator, but the same thing happens (which results in an endless loop of it asking for my SMS code + my revocation code).

It appears that SteamAuth currently does not work :\

BlueRaja commented 8 years ago

I found a workaround. It seems the issue is with linking a phone number. If I add a phone number manually beforehand, SteamAuth works correctly.

Apostol77794 commented 8 years ago

I have exactly the same error Bot.cs line 833: var smsCode = WaitForInput(); -->Valid code line 834: var authResult = authLinker.FinalizeAddAuthenticator(smsCode); -->BadSMSCode