Eelco
04/16/2025, 2:35 PMts
// Get the private key from environment variables
const key = new TextEncoder().encode(process.env.VAPI_PRIVATE_KEY)
// Generate the token using a JWT library or built-in functionality
const token = await new SignJWT(payload)
.setProtectedHeader({ alg: 'HS256' })
.setExpirationTime('1h')
.sign(key)Eelco
04/16/2025, 2:39 PM// Generate the token using a JWT library or built-in functionality
What does built-in functionality even mean?Eelco
04/16/2025, 2:41 PMdigital-forest
04/16/2025, 2:44 PMEelco
04/16/2025, 3:09 PM