SDK
SDK Javascript v5.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

whoAmI #

Returns informations about the user who is currently loggedin.


whoAmI(callback) #

ArgumentsTypeDescription
callbackfunctionCallback handling the response

Callback Response #

Returns an instantiated User object.

Usage #

// Using callbacks (NodeJS or Web Browser)
kuzzle.whoAmI(function (err, result) {
  // "result" is a User object
});
// Using promises (NodeJS only)
kuzzle.whoAmIPromise()
  .then(res => {
    // "res" is a User object
  });