Gsoares
05/02/2025, 2:06 AMVapi Support Bot
05/02/2025, 2:08 AMjavascript
// Check your JWT generation code
const payload = { orgId: 'YOUR_ORG_ID' };
const privateKey = process.env.VAPI_PRIVATE_KEY; // Ensure this matches the key registered with Vapi
const token = jwt.sign(payload, privateKey, { expiresIn: '1h' });
Make sure you're using the private key (not public key) when making API calls.
Sources:
- [JWT Authentication Documentation](https://docs.vapi.ai/customization/jwt-authentication)
- [Discord conversation about JWT errors](https://discord.com/channels/1211482211119796234/1336414771309838448)
- [Discord conversation about private key issues](https://discord.com/channels/1211482211119796234/1336360744916226168)Gsoares
05/02/2025, 2:24 AMChiranjeet Mishra
05/02/2025, 8:31 PM