Jump to content
McKay Development

optimus

Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by optimus

  1. On 6/13/2022 at 8:40 PM, Dr. McKay said:

    No, you can only use a 2FA code once. If you've already used a code, then you'll need to wait for the next code to be generated.

    You shouldn't be logging into SteamCommunity with an account name and password if you're already using SteamUser. In the webSession event, just call community.setCookies(cookies);

    That's all you need.

    you mean like this? because if i try to upload avatar it gets an error is this because im not logged in?

    Screenshot 2022-06-14 223242.png

    Just now, optimus said:

    you mean like this? because if i try to upload avatar it gets an error is this because im not logged in?

    Screenshot 2022-06-14 223242.png

    im getting LoggedIn = true is the uploadavatar an error on my end? the format is jpg should i convert it or something?

    Screenshot 2022-06-14 223445.png

  2. 3 hours ago, Dr. McKay said:

    Get rid of {encoding:"base64"}. You don't want a base64 string, you want a Buffer.

    just removed it and still get a 302 status i even changed the cookies witch consist of (sessionid,steamloginsecure,steammachineauth) i commented out content size header incase it was messing with something but still doesnt work. i can see that its a buffer after removing {encoding:"base64"} but still wont work :(

  3. Bellow i have some code, i took the FormData: from your steamcommunity files and just changed the values to match mine. the headers are then the same as any other request i send to steam with the cookies of course taken directly from the browser (i copied and pasted the stesssionid to the formdata: one ) however i get a 302 im not sure why can you help?

     

    var cookie = "//cookies pasted from browser"

    var buffer = fs.readFileSync("./pfps/[object Object].jpg",{encoding:"base64"})

    console.log(buffer)

     

    request({

        url:"https://steamcommunity.com/actionFileUploaders/",

        method:"POST",

        headers:{

            'Connection': 'keep-alive',

            'Accept': 'application/json, text/plain,*/*',

            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36',

            "Accept-Encoding":"gzip, deflate, br",

            //'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', changed for miltipart formdata

            'Origin': 'https://steamcommunity.com',

            'Sec-Fetch-Site': 'same-origin',

            'Sec-Fetch-Mode': 'cors',

            'Sec-Fetch-Dest': 'empty',

            'Accept-Language': 'en-GB,en-US;q=0.9,en;q=0.8',

            "Content-Type":"multipart/form-data;",

            "Referer":`https://steamcommunity.com/profiles/id64/edit/avatar`,

            "Content-Length":buffer.length,

            'Cookie': cookie

        },

        formData: {

            "MAX_FILE_SIZE": buffer.length,

            "type": "player_avatar_image",

            "sId": `id64`,

            "sessionid": `sID`,

            "doSub": 1,

            "json": 1,

            "avatar": {

                "value": buffer,

                "options": {

                    "filename": "avatar.jpg",

                    "contentType": "image/jpeg"

                }

            }

        },

    },function callback(error,response, body) {

        console.log(response.statusCode,body,);

        //console.log(body);

    })

×
×
  • Create New...