Reputation: 67
Im trying to send a Steam Tradeoffer in Python, but i always get a 400 - null response. I am aware, that there are some similar questions, but none of these got the "null response" issue resolved. Has someone an Idea, why i always get the 400 response?
My Https request looks like this:
requests.post("https://steamcommunity.com/tradeoffer/new/send", headers=headers, cookies=cookies, data=data)
with this Form data:
{
"sessionid": "XXXX",
"serverid": 1,
"partner": "partner_id",
"tradeoffermessage": "",
"json_tradeoffer": {
"newversion": true,
"version": 2,
"me": {
"assets": [
{
"appid": 730,
"contextid": "2",
"amount": 1,
"assetid": "XXXXX"
}
],
"currency": [],
"ready": false
},
"them": {
"assets": [],
"currency": [],
"ready": false
}
},
"captcha": "",
"trade_offer_create_params": "tradeOfferToken"
}
this Header:
{
"Referer": "https://steamcommunity.com/tradeoffer/new/?partner=XXXX&token=XXX"
}
Cookies:
cookies = {
"sessionid": "XXXXXXXXXXXXXXXXXXXXX",
"steamLoginSecure": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
}
My json_tradeoffer is this:
{
"newversion": true,
"version": 2,
"me": {
"assets": [
{
"appid": 730,
"contextid": "2",
"amount": 1,
"assetid": "XXXXX"
}
],
"currency": [],
"ready": false
},
"them": {
"assets": [],
"currency": [],
"ready": false
}
}
Upvotes: 2
Views: 13