Not_a_good_sniper Posted November 8, 2022 Share Posted November 8, 2022 Hello again, everyone. Decided to mess around again with some coding a little bit deeper. But there is one issue I encountered with and can't find a solution for it. The problem is whenever I send a request to create a buy order for a fabricator (turns out to be kits are also an issue), server responses with Item is invalid. Here I quickly made a script for testing: const axios = require('axios'); const api = 'https://backpack.tf/api/classifieds/list/v1'; const userToken = 'token'; axios({ url: api, method: 'POST', params: { token: userToken }, data: { listings: [{ intent: 0, item: { quality: 'Unique', item_name: "Specialized Killstreak Rocket Launcher Kit" }, offers: 1, buyout: 1, details: 'I want to buy this crap', currencies: { keys: 0, metal: 0.05 } }] } }).then(({data}) => { for (const i in data.listings){ const listing = data.listings[i]; if (listing.error){ console.log('Failed to create a listing:', listing.error); } else { console.log('Success'); } } }).catch((err) => { console.log('Request error:', err); }); // Output: Failed to create a listing: Item is invalid. This should work, and in fact, it works, as long as you change item_name to something else. For example I changed it to Specialized Killstreak Rocket Launcher. See? (Output is also Success) Is there anything that I am doing wrong? The only solution that I have come up with is using defindexes, but I really, really want to touch that. Edit: I found out that you can create buy orders for *empty* fabs and kits if you for example type Specialized Killstreak Kit But I have no clue what to do with it. I guess you need to set an item attribute or something, just like with paints and spells and stuff, and I have no idea what should I do next. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now