ElonMusk Posted April 27 Report Share Posted April 27 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 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 27 Report Share Posted April 27 You're sending all the post parameters as cookies. Quote Link to comment Share on other sites More sharing options...
ElonMusk Posted April 28 Author Report Share Posted April 28 21 hours ago, Dr. McKay said: You're sending all the post parameters as cookies. where do i put the parameters? do they go in the post body and also what about the headers should it just be the referer? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 28 Report Share Posted April 28 The post parameters go in the post body, yes. Referer should be the only extra header you need. Quote Link to comment Share on other sites More sharing options...
ElonMusk Posted April 28 Author Report Share Posted April 28 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? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 28 Report Share Posted April 28 That sounds like your cookies are invalid or expired. Quote Link to comment Share on other sites More sharing options...
ElonMusk Posted Monday at 05:37 PM Author Report Share Posted Monday at 05:37 PM 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. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted Tuesday at 06:32 AM Report Share Posted Tuesday at 06:32 AM Cookies go in headers, not in the request body. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cookie Quote Link to comment Share on other sites More sharing options...
ElonMusk Posted Tuesday at 07:17 PM Author Report Share Posted Tuesday at 07:17 PM 12 hours ago, Dr. McKay said: Cookies go in headers, not in the request body. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cookie this is what i have right now yet i still get a 403 i guess you mean the steam login cookies go in the headers however ive tried the other way arround and even both but still no progress Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted Thursday at 12:43 AM Report Share Posted Thursday at 12:43 AM Cookies go in the Cookie header. Check that MDN link I posted. Quote Link to comment Share on other sites More sharing options...
ElonMusk Posted Thursday at 08:41 PM Author Report Share Posted Thursday at 08:41 PM (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 Thursday at 08:43 PM by ElonMusk unreadable lol had to convert to text Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.