Bixby Developer Center


User Context

This sample capsule is a quick demonstration of the $vivContext variable for passing user context information.

Download Capsule


Because you cannot submit a capsule with the example namespace, in order to test a sample capsule on a device, you must change the id in the capsule.bxb file from example to your organization's namespace before making a private submission.

For example, if your namespace is acme, change example.vivContext to acme.vivContext.

After you compile the NL, you can run this query in the Simulator to see the value of $vivContext: "Show user context".

This parameter declaration makes $vivContext available to the JavaScript action implementation:

// Request access to the $vivContext by declaring it as a parameter
module.exports.function = function accessVivContext ($vivContext) {
return JSON.stringify($vivContext, undefined, 1);

View master on GitHub

$vivContext.bixbyUserId will be null by default. In order to access the value, you must request this permission in your capsule.bxb file:

  permissions {

View dcf62324e3136d0f8a5596eef18418585b4b77be on GitHub

Video Tutorial: Getting User Information using $vivContext