Javascript SDK
Reference
Constructor

LlamaWorkspace constructor

To instantiate the SDK you simply need to provide an accessKey that you can get from Llama Workspace. Use the access key together with verifyAccessKeyOrThrow as safety measure to ensure that only authorized calls can interact with your code.

Parameters

  • params: LlamaWsConstructorParams - The parameters to instantiate the SDK.
    • accessKey: string - The app-scoped access key.

Returns

void

Example

import {
  LlamaWorkspace,
  type LlamaWsConstructorParams
} from "llamaworkspace";
 
// Get the accessKey from an "External app" in Llama Workspace
const ACCESS_KEY = "<app-access-key>";
 
const llamaWorkspace = new LlamaWorkspace({
  accessKey: ACCESS_KEY,
} : LlamaWsConstructorParams);