Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


i guess you're wink api support! #4

mrose17 opened this Issue · 10 comments

3 participants


here's what i'm sending in the post for /oauth2/token


and here's what i get back:


eh? i've looked at your code and you're sending password as well. am i missing the obvious?

jso commented

thanks. i removed base_url, and verified the headers:

    { protocol: 'https:',
      slashes: true,
      auth: null,
      host: '',
      port: null,
      hostname: '',
      hash: null,
      search: null,
      query: null,
      pathname: '/oauth2/token',
      path: '/oauth2/token',
      href: '',
      agent: false,
      method: 'POST',
      headers: { 'Content-Type': 'application/json' } }

so, i suspect that we're sending the same thing. odd.

jso commented

thanks. i'll try a few more things and then email them tomorrow...

@mrose17 mrose17 closed this
jso commented

@mrose17 Email me a Charles web proxy session or a cURL command illustrating exactly what you're doing and I'll have a look.


many thanks! back in 5m.


@jso and @mattbornski - the repo is now public at

obviously, i'm doing something clueless here, but as to which clue i'm lacking, i'm not sure.

to test (on a system with node): edit test.'s to include "the needful" and then

    % node test.js

ps: feel free to push requests or issue me at


@mattbornski i found the issue and updated the repo.

the issue is that the Wink API server doesn't like the JSON generated by JSON.stringify(). as @jso suggested, putting some whitespace in there made the parser happy! onward...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.