https://retellai.com/?utm_source=discord&utm_medium=seo logo
Axios Error: error code: ERR_BAD_REQUEST, error me...
# ❓・ai-evy-support
b
@AI Evy Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 401 response status: 401 response data: ["Unauthorized."] error how do i fix it
a
Thanks for tagging me @Brody. I'll look through relevant sources and get back to you shortly.
### Answer A 401 Unauthorized error typically indicates an authentication issue with your API key. Here are the steps to fix this: For REST API requests, ensure you're including your API key in the request headers with the correct format [(1) ]() :
Copy code
Authorization: Bearer YOUR_API_KEY
For webhook integrations, there are a few specific solutions depending on your setup: If you're using Make.com, you can add a custom header to your Retell webhook call [(2) ]() : - Add this header:
x-make-apikey: Retell
- This should resolve the 401 error and allow the webhook to go through General troubleshooting steps: 1. Verify your API key is correct and hasn't expired 2. Check that you're using the proper authentication format for REST API calls [(1) ]() 3. For webhook endpoints, ensure your webhook API key is properly configured for signing and verification 4. Make sure you're not sharing API keys in public repositories or client-side code If you're still experiencing issues after checking these authentication requirements, the problem might be specific to your integration setup.
​ To learn more, see the sources I considered: [[1] API Key Overview](https://docs.retellai.com/accounts/api-keys-overview) [[2] Retell fails to send data to Make](https://discord.com/channels/1186424376300679209/1385635743925272677) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.