diff --git a/lib/webapi.js b/lib/webapi.js index c9f2983..8880bf4 100644 --- a/lib/webapi.js +++ b/lib/webapi.js @@ -25,7 +25,9 @@ TradeOfferManager.prototype._apiCall = function(httpMethod, method, version, inp input = input || {}; - if (this.apiKey) { + // We shouldn't strictly need to check useAccessToken here because we wouldn't have an API key anyway, but some + // people insist on manually assigning their API key despite the docs telling you not to do that. + if (this.apiKey && !this.useAccessToken) { input.key = this.apiKey; } else { input.access_token = this.accessToken;