Typically, adding the Weavy client SDK to your application or website is enough to get you started. But you probably want to tweak the default options a bit to make your Weavy behave the way you want it to.

Using options

Specify options by passing an object with properties when constructing the Weavy instance.


   var weavy = new Weavy({

       jwt: '{server_generated_jwt_token}'



Available options

jwt JSON Web Token (JWT) for authentication.
lang Language code of preferred user interface language, e.g. en for English. When set, it must match one of your configured languages.
tz Timezone identifier, e.g. Pacific Standard Time. When specified, this setting overrides the timezone setting on a user´s profile. The list of valid timezone identifiers can depend on the version and operating system of your Weavy server. To get an updated list you can run tzutil.exe /l.
url Url to your weavy server. Defaults to the location where the client script was dowloaded from.
init Indicates whether the weavy instance should initialize directly. Defaults to true. Set it to false and call weavy.init() to initialize at a later point.
id A string identifying the weavy instance. This option is automatically set unless you specify it.

Default options

The default options are stored in an object as a property called defaults on the Weavy class. You can read or set these options before you create a new Weavy instance. The defaults will be applied on all Weavy instances unless other options are specified.

Avoid putting the jwt token in default settings, since it's only valid for a limited time and should be consumed when passed to the server.


   Weavy.defaults.url = '{weavyurl}';

   var weavy = new Weavy();