Npm package working with user's api keys


#1

Hey, guys! What am I missing? I use npm package (works with API) and configure package with user’s api keys. I have two users for test now, but they are interrupting each other. 2nd user receive data belongs 1st user. How can I run npm package like private instance for each users?


#2

Can you share some code showing how you’re configuring the user API keys?


#3

@hwillson my code here:

import somepackage from 'node.somepackage.api';
Meteor.methods({
    somepackageInit(){
	    somepackage.options({
	        'apikey' : api.key
	    });
    },
});

I call somepackageInit() first, then I call other methods using API.