Learn more about the Jovo
$user property contains data and features about the specific user interacting with the app.
In addition to the data, platforms offer their own user specific features (for example, retrieving a user's email address from their profile) that can be found in the respective platform's documentation.
After a request has been received, the app loads the data from the database. You can then access it like this:
You can add and manipulate data entries like this:
this.$user.data.key = value; // Example this.$user.data.score = 20;
You can access a specific data element like this:
this.$user.data.key; // Example const score = this.$user.data.score;
Additionally to the persisted data, you can also access the following information about the user:
this.$user.id: The user's ID is also the key to their database entry. This is either a string or
undefined(if the platform does not support user IDs).
this.$user.accessToken: For platforms that offer account linking, the
accessTokenis a string for signed in users. The value is
undefinedif the user hasn't linked their account, or the platform does not support account linking.
this.$user.createdAt: When was this user's database entry created?
this.$user.updatedAt: When was this user's data last updated?
truefor first-time users.