Froxz Posted December 30, 2018 Report Share Posted December 30, 2018 Hi,it is possible to set API?Trade-offers: this.apiKey = null; this._community.getWebApiKey(this._domain, (err, key) => { if (err) { callback(err); return; } this.apiKey = key; callback(); }); I can make a pull request to change this.apiKey = (options.apiKey || null); Or there is a reason for not giving option to pass api key? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted December 31, 2018 Report Share Posted December 31, 2018 Or there is a reason for not giving option to pass api key? Yes, because ignorant coders will almost definitely start passing API keys that don't belong to the account they're signed into, and start posting GitHub issues asking what's going on. If you know what you're doing, you can set the apiKey property directly with the correct key, but please make sure you actually know what you're doing. Jmopel 1 Quote Link to comment Share on other sites More sharing options...
Froxz Posted January 4, 2019 Author Report Share Posted January 4, 2019 Yes, because ignorant coders will almost definitely start passing API keys that don't belong to the account they're signed into, and start posting GitHub issues asking what's going on. If you know what you're doing, you can set the apiKey property directly with the correct key, but please make sure you actually know what you're doing. Hi, thanks for reply, yes I ended up doing it directly: user.on('webSession', function(sessionID, cookies) { console.log(data.login+': Got webSession'); manager.apiKey = data.api_key; manager.setCookies(cookies, function(err) {}); community.setCookies(cookies); }); Yes, I manually generate the API KEY (Because I use same KEY for LOGIN) just less request and hassle because I know the API KEY. Thank you. Jmopel 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.