SDK
SDK Javascript v5.x
1

whoAmI #

Returns informations about the user who is currently loggedin.


whoAmI(callback) #

Arguments Type Description
callback function Callback handling the response

Callback Response #

Returns an instantiated User object.

Usage #

Copied to clipboard!
// 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
  });