Skip to content

Commit

Permalink
Don't attempt to use an API key if useAccessToken is set, even if an …
Browse files Browse the repository at this point in the history
…API key exists
  • Loading branch information
DoctorMcKay committed Apr 4, 2024
1 parent 194f3d0 commit 107d8cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/webapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 107d8cc

Please sign in to comment.