Jump to content
McKay Development

how to accept trade using post request?


ElonMusk
 Share

Recommended Posts

im using axios and get "Uncaught Error Error: Request failed with status code 403" can you take a look at the image below and tell me whats wrong i had alook at

  and everything looks to be correct any help would be apreciated

Screenshot 2022-04-27 201505.png

Link to comment
Share on other sites

1 hour ago, Dr. McKay said:

The post parameters go in the post body, yes. Referer should be the only extra header you need.

i made a request using postman just incase something was wrong with my code if i put a ? before the accept (https://steamcommunity.com/tradeoffer/tradeid/?accept)

i get taken to a steam login page however if there is no ? then i get a 403 could there be a problem with the authentication?

Screenshot 2022-04-28 212333.png

Screenshot 2022-04-28 212252.png

Link to comment
Share on other sites

  • 3 weeks later...
On 4/28/2022 at 9:37 PM, Dr. McKay said:

That sounds like your cookies are invalid or expired.

can you confirm im doing everything correct? i still get null the cookies go like this : steamlogin,steamloginsecure and session id are all from a instance where i sign in with steam user and console log the cookies i then pasted them into the postman request, the only extra header is the referrer . partner id is a 32 steam id of my trade partner, captcha remains empty and serverid is set to 1. is there something im doing wrong? the params page on post man adds stuff to the top of the link ex: steamcommunity.com/accept?param. sorry if im bothering you i just cant find alot about steam http request on the internet.

 

3.thumb.png.fc7ba94cbe73515b5e48600df8b162b8.png2.thumb.jpg.e80a2b9db9ede0f2d807be6a0260d6ca.jpg1.thumb.jpg.95e0523b9d8ff1fb316c6c6aebd74478.jpg

Link to comment
Share on other sites

Posted (edited)

axios.post("https://steamcommunity.com/tradeoffer/5188600819/accept",{
    headers:{
        "Referer":"https://steamcommunity.com/tradeoffer/5188600819/",
        "cookies":{"steamLoginSecure":"-----","steamMachineAuth-----":"------","steamLogin":"-----","sessionid":"-----",}
    },
    form:{
        "tradeofferid":5188600819,
        "partner"://partner id ,
        "serverid":1,
        "captcha": "",
    }

})
.then((res)=>{
    console.log(res)
})
 //so i can see the request data after before it ends
setTimeout(()=>{console.log("test")},100000);

i come up with this and still get a 403 this is correct right? the cookies are in the cookie header

Edited by ElonMusk
unreadable lol had to convert to text
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...