maqnetic
05/02/2025, 5:35 PMVapi Support Bot
05/02/2025, 5:37 PMjavascript
// Example of correct JWT implementation
const token = jwt.sign(
{ orgId: 'YOUR_ORG_ID' }, // payload
process.env.PRIVATE_KEY, // private key
{ expiresIn: '1h' } // options
);
Make sure you're using the private key (not public key) and that it's in PEM format.
Sources:
- [Troubleshooting JWT verification errors in Vapi](https://discord.com/channels/1211482211119796234/1336414771309838448)
- [Common causes of JWT verification failures in Vapi](https://discord.com/channels/1211482211119796234/1336360744916226168)
- [JWT Authentication](https://docs.vapi.ai/customization/jwt-authentication)maqnetic
05/02/2025, 5:47 PMVapi Support Bot
05/02/2025, 5:49 PMjavascript
// Verify your API key is correctly configured in the dashboard
// No need for manual JWT implementation if using the Start Call button
This is likely causing the JWT verification error despite not using the token model directly.
Sources:
- [Troubleshooting JWT verification errors in Vapi](https://discord.com/channels/1211482211119796234/1336414771309838448)
- [API Key Configuration Issues](https://discord.com/channels/1211482211119796234/1336414771309838448)Chiranjeet Mishra
05/02/2025, 6:11 PM