Hi dark,
To resolve the "401 Unauthorized" error you're encountering, verify the following steps:
1. **API Key Type**: Ensure you're using the correct type of API key for the endpoint you're accessing. For public endpoints, use a public key, and for endpoints that require authentication, use a private key.
2. **Correct Endpoint**: Double-check that the endpoint you are calling requires the key you are using (public or private). Each endpoint may have different authentication requirements.
3. **Dashboard Settings**: Visit the Vapi dashboard to manage and verify your API keys. Ensure they are active and correctly configured for the endpoints you are accessing.
4. **Token Inclusion**: Make sure that your API request includes the correct headers:
Authorization: Bearer your-api-key
Please ensure these steps are correctly implemented. If the error persists, consider generating a new API key from your Vapi dashboard to ensure your keys are up-to-date and troubleshoot further. For more information on server authentication, refer to the [Server Authentication](
https://docs.vapi.ai/server-url/server-authentication) documentation.
Also could you please send your request payload and the endpoint URL you are using?