{
errors: [
{
code: 8,
message: 'The trade request should include offers.',
userFacingMessage: 'Something went wrong'
}
]
}
this is my code
-- u is the user object i put into a table, and d is the item itself. all of the uaids are valid
fetch(`https://trades.roblox.com/v1/trades/send`,{method:"POST",headers: { 'Content-Type': 'application/json',"X-CSRF-TOKEN":token,"cookie": ".ROBLOSECURITY="+process.env.cookie+";",
tradeRequest:
{
"offers": [
{
"userId": u.id,
"userAssetIds": [
parseInt(d.id)
],
"robux": 0
},
{
"userId": 895445660,
"userAssetIds": [
1167613401
],
"robux": 0
}
]
}
For anyone curious as to how I fixed this, the body w/ the offers needs to be a stringified JSON. It should NOT be a header, it should be the request payload @Rainzyyy