Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fern/snippets/sdks/web/import-web-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ Import the package:
import Vapi from "@vapi-ai/web";
```

Then, create a new instance of the Vapi class, passing your **Public Key** as a parameter to the constructor:
Then, create a new instance of the Vapi class, passing one of the following as a parameter to the constructor:
- your **Public Key**
- a generated **JWT**

```javascript
const vapi = new Vapi("your-public-key");
const vapi = new Vapi("your-public-key-or-jwt");
```

You can find your public key in the [Vapi Dashboard](https://dashboard.vapi.ai/account).
You can generate a JWT on the backend following [JWT Authentication](/customization/jwt-authentication) instructions.
Loading