Skip to content

Commit a565878

Browse files
authored
Web SDK JWT Instructions
1 parent 78c466d commit a565878

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fern/snippets/sdks/web/import-web-sdk.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ Import the package:
44
import Vapi from "@vapi-ai/web";
55
```
66

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

911
```javascript
10-
const vapi = new Vapi("your-public-key");
12+
const vapi = new Vapi("your-public-key-or-jwt");
1113
```
1214

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

0 commit comments

Comments
 (0)