Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3535
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    Dr. McKay got a reaction from mqwerty in Parse point shop items   
    Every Steam WebAPI endpoint that accepts and outputs protobuf also accepts input_json, and will output json.
    Here is the protobuf definition for BatchedQueryRewardItems/v1, and repeated .CLoyaltyRewards_QueryRewardItems_Request requests means that it expects a json object with key "requests", which is an array of CLoyaltyRewards_QueryRewardItems_Request objects, which is defined here.
    So we could make a URL like this: https://api.steampowered.com/ILoyaltyRewardsService/BatchedQueryRewardItems/v1?input_json=%7B%22requests%22%3A%5B%7B%22appids%22%3A%5B%5D%2C%22community_item_classes%22%3A%5B3%5D%2C%22reward_types%22%3A%5B1%5D%2C%22excluded_community_item_classes%22%3A%5B%5D%2C%22definitionids%22%3A%5B%5D%2C%22filters%22%3A%5B4%5D%2C%22filter_match_all_category_tags%22%3A%5B%5D%2C%22filter_match_any_category_tags%22%3A%5B%5D%2C%22contains_definitionids%22%3A%5B%5D%2C%22excluded_content_descriptors%22%3A%5B%5D%2C%22excluded_appids%22%3A%5B%5D%2C%22excluded_store_tagids%22%3A%5B%5D%2C%22store_tagids%22%3A%5B%5D%2C%22time_available%22%3Anull%2C%22language%22%3A%22english%22%2C%22count%22%3A10%2C%22cursor%22%3Anull%2C%22sort%22%3A2%2C%22sort_descending%22%3Afalse%2C%22include_direct_purchase_disabled%22%3Anull%2C%22search_term%22%3Anull%7D%2C%7B%22appids%22%3A%5B%5D%2C%22community_item_classes%22%3A%5B17%5D%2C%22reward_types%22%3A%5B1%5D%2C%22excluded_community_item_classes%22%3A%5B%5D%2C%22definitionids%22%3A%5B%5D%2C%22filters%22%3A%5B%5D%2C%22filter_match_all_category_tags%22%3A%5B%5D%2C%22filter_match_any_category_tags%22%3A%5B%5D%2C%22contains_definitionids%22%3A%5B%5D%2C%22excluded_content_descriptors%22%3A%5B%5D%2C%22excluded_appids%22%3A%5B%5D%2C%22excluded_store_tagids%22%3A%5B%5D%2C%22store_tagids%22%3A%5B%5D%2C%22time_available%22%3Anull%2C%22language%22%3A%22english%22%2C%22count%22%3A10%2C%22cursor%22%3Anull%2C%22sort%22%3A2%2C%22sort_descending%22%3Afalse%2C%22include_direct_purchase_disabled%22%3Anull%2C%22search_term%22%3Anull%7D%5D%7D
    With a large enough request, you might run into URL length limitations, in which case you'd want to encode your request using those protobufs. I believe you could still pass &format=json to get a json response even if you send a protobuf request.
    Exactly what the community item classes, reward types, etc mean, I don't know.
  2. Like
    Dr. McKay got a reaction from iulian in Issue confirming tradeoffers   
    The callback to getOffers has three argument, not two. It's (err, sent, received)
    Your code as written is only looking at sent offers, so it's expected you wouldn't see your received offers in there.
    I also see some other issues in your code. Firstly, you're creating a new 30-second interval on checkTrades every time webSession is emitted, so after two webSession events you're calling checkTrades twice every 30 seconds, thrice after 3 emits, and so on. This is in addition to TradeOfferManager's internal 30 second polling that you've enabled via pollInterval: 30000.
    I'd recommend that you eliminate your checkTrades function entirely and instead use the offerList event, which is designed for exactly what you're using checkTrades for now. It'll be emitted every time TradeOfferManager performs a poll, which is every 30 seconds as configured here.
  3. Like
    Dr. McKay got a reaction from iulian in Issue confirming tradeoffers   
    Yes, a new secret is generated when a mobile authenticator is set up.
    When logging in using steam-user, you need to refresh your web session periodically. Call webLogOn() to do so.
  4. Thanks
    Dr. McKay got a reaction from auditt19 in Need help with a steam idler   
    If the clock is right, then the secret must be wrong.
    Try using the secret in a test script locally. If it generates correct codes, something is wrong with how you're transporting the secret to Heroku; maybe it's encoding it weirdly. If it's wrong locally, then you have the wrong secret. Maybe you exported it from SDA wrong.
  5. Like
    Dr. McKay got a reaction from SteamUs1 in Missing mention of the “getUserInventoryContents” method   
    https://github.com/DoctorMcKay/node-steamcommunity/wiki/CSteamUser#getinventorycontentsappid-contextid-tradableonly-language-callback
  6. Thanks
    Dr. McKay got a reaction from auditt19 in Need help with a steam idler   
    If the codes it's generating don't match the codes generated by the app, then your secret is wrong or the clock is wrong.
  7. Like
    Dr. McKay got a reaction from sfwefsdHashiiiieee in How do I login with steam-user while steam/cs2 is open on windows?   
    Only one Steam client session can be in-game at a time or else you get the LoggedInElsewhere error you mentioned. That guy isn't running CS2 on the same account twice; the real game instance must be logged in under a different account.
    No.
  8. Like
    Dr. McKay reacted to SteamUs1 in Obtaining SteamLogin Secure Token   
    Topic is irrelevant, I found the post where steam session is explained. Thank you
  9. Like
    Dr. McKay got a reaction from Cheekyzzz in Steam-Session Authentication unusual attempt when login   
    No.
  10. Thanks
    Dr. McKay got a reaction from asdfghjkl in Get the original_id of my items listed on the steam market   
    Yeah that should work fine.
  11. Like
    Dr. McKay got a reaction from Andrei Elvis in sentOfferChanged is not firing. The bot can send offer though   
    You need to enable the useAccessToken option or trades containing CS2 items won't appear.
  12. Like
  13. Like
    Dr. McKay reacted to cemaksoy in createAuthSessionTicket   
    I solved the problem, I was sending 2 verifications to the server
  14. Thanks
    Dr. McKay got a reaction from Akaz in Any way to detect trade ban on the account?   
    Using the GetPlayerBans endpoint is going to be your best bet. There's no event for it.
  15. Like
    Dr. McKay got a reaction from يودا in Correct way of enabling 2FA   
    Either works, but using steamcommunity is "better" since it more closely mimics how the official mobile app works. steam-user just happens to work but may break at any time (though it's been working since 2FA came out, so seems pretty unlikely that it'll break).
  16. Thanks
    Dr. McKay got a reaction from AshIgorash in offer.data method headache   
    Update to 2.11.5 and this should work properly. In previous versions it checks if the new value === the old value, which it would in this case since it's the same object reference.
  17. Like
    Dr. McKay got a reaction from TheMaster in Timeout and code breaks   
    If log on succeeds, you get a loggedOn event. Check the example scripts in the GitHub repo.
  18. Thanks
    Dr. McKay got a reaction from TheMaster in Timeout and code breaks   
    You'd want to call logOn for any error event, likely after a delay.
  19. Thanks
    Dr. McKay got a reaction from TheMaster in Timeout and code breaks   
    Catch the error event to prevent the crash, and call logOn again to kick off trying to connect.
  20. Thanks
    Dr. McKay got a reaction from lame in Is there a way to edit steam profile showcases?   
    Not at the moment.
  21. Like
    Dr. McKay got a reaction from TheMaster in Timeout and code breaks   
    It's not mentioned in the documentation, but you only get an eresult in the error event if a Steam connection can actually be established. If you don't have an eresult proeprty, you can assume there was a network issue.
    Only you can properly decide the best course of action for your app, but if your network is down then yeah, probably all you can do is wait and retry until the network comes up.
  22. Thanks
    Dr. McKay got a reaction from mqwerty in BeginAuthSessionViaCredentials   
    https://steamerrors.com/5
  23. Like
    Dr. McKay got a reaction from botan in CSGO Game Coordinator Message Analisis Tool Request   
    You can use NetHook2 for this.
  24. Like
    Dr. McKay got a reaction from dangercoder in [Custom storage] Prevent steam-trade-offer-manager to read/write from file system   
    If you're using a custom storage engine, don't change the value of the dataDirectory option. If you set it to null, the storage property isn't initialized so you get that error attempting to read 'on' of undefined.
    steam-tradeoffer-manager uses the same storage scheme as steam-user, but they don't share the same instance. You need to register your save and read events on your TradeOfferManager instance the same way you registered them on your SteamUser instance.
  25. Like
    Dr. McKay got a reaction from Coldblackice in Access tokens and refreshtoken lifetime   
    Decode the JWT and check the exp parameter, but be aware that tokens can be invalidated server-side at Valve's discretion, and nobody's sure exactly what makes that happen besides IP changes.
×
×
  • Create New...