alex7kom / node-steam-tradeoffers

Steam Trade Offers for Node.js **NO LONGER MAINTAINED**
MIT License
288 stars 98 forks source link

getOfferToken is broken #273

Closed TrueCarry closed 8 years ago

TrueCarry commented 8 years ago

Apparently steam broke https://steamcommunity.com/my/tradeoffers/privacy this url, so you should use full one now. I've changed my local code to

SteamTradeOffers.prototype.getOfferToken = function(steamid, callback) {
  if(typeof steamid == 'function') {
    callback = steamid;
    steamid = null;
  }
  this._request.get({
    uri: communityURL + (steamid
        ? `/profiles/${steamid}/tradeoffers/privacy`
        : `/my/tradeoffers/privacy`)

Not sure if it's best way to handle this, but it works.

alex7kom commented 8 years ago

It also works with plain HTTP http://steamcommunity.com/my/tradeoffers/privacy which makes me think that it is a misconfiguration of Steam CDN. So I'd like to wait a bit before making any changes to the library.