Miteg
06/22/2025, 3:44 PMAditya
06/23/2025, 9:26 PMjavascript
const payload = {
orgId: process.env.ORG_ID,
token: {
tag: "private",
permissions: {
premiumAccess: true
}
}
};
3. **Sign the Token**: Use your private key to sign the token securely.
4. **Use the Token in Calls**: Before users initiate a call, ensure they provide this token. You can integrate the token validation in your backend to verify if the user has the necessary permissions to proceed with the call.
For more details on JWT Authentication and API usage, refer to the [JWT Authentication Guide](https://docs.vapi.ai/customization/jwt-authentication). This approach allows you to "pre-sign" calls with tokens, governing access based on user attributes.