Hi there! 👋 Sorry to hear you're experiencing JWT issues.
I can't determine exactly what caused the sudden change in your JWT functionality since you didn't change anything and it was working previously. However, I can definitely help troubleshoot this "token" field missing error!
Based on the information I found, here are some possible reasons and troubleshooting steps for your JWT issue:
## Possible Causes
The error message "JWT doesn't permit access. Hot tip, you may be missing 'token' in your JWT" suggests there might be an issue with your JWT structure or configuration. According to [troubleshooting information](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336414771309838448), this could be due to:
1. **Malformed JWT Token**: Your JWT might be incorrectly formatted or constructed
2. **Private Key Issues**: Problems with the private key configuration or format
3. **Authorization Header Problems**: The JWT might not be correctly included in the request header
## Troubleshooting Steps
### 1. Inspect Your JWT Payload
You can use [jwt.io](
https://jwt.io/) to decode and verify your JWT to see if the "token" field is actually missing from the payload. A JWT token should be well-formed with three parts separated by dots (header.payload.signature).
### 2. Verify JWT Format and Key
Ensure your JWT is correctly formatted and signed with the proper private key. The private key should typically be in PEM format according to [Vapi's requirements](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336360744916226168).
### 3. Check Authorization Header
Confirm the token is being sent correctly in the authorization header as:
Authorization: Bearer {token}
### 4. Review API Key and Configuration
- Verify you're using the correct API key from Vapi
- Check if your environment variables (e.g.,
ORG_ID
and
PRIVATE_KEY
) are correctly set up