wunderlist.js icon indicating copy to clipboard operation
wunderlist.js copied to clipboard

Ability to provide access token on a service call

Open dev-tim opened this issue 9 years ago • 0 comments

Hello folks!

At the moment I'm curious if it's possible to provide access token when calling specific API resource. For example:

var wunderlistAPI = new WunderlistSDK({
  'accessToken': 'a user access_token',
  'clientID': 'client_id'
});

wunderlistAPI.http.lists.all()

will return lists for a user who owns access token that we passed to the WunderlistSDK constructor.

I'd like to use this library on the server side, but it seems to be a bit of overkill to recreate WunderlistSDK instance on each call. Instead it would be cool to see something like:

var wunderlistAPI = new WunderlistSDK({
  'clientID': 'client_id'
});

wunderlistAPI.http.lists.all(accessToken)

so it would be possible to re-use wunderlistAPI instance serving requests for different users.

dev-tim avatar Dec 06 '16 21:12 dev-tim