Invalid Key. Hot tip, you may be using the private...
# support
k
I rotated my public keys in Manage → API Keys. My assistant still fails from Dashboard Talk, and the dashboard appears to be validating against the CLI key instead of the public key. Logging out/in and incognito did/did not fix it. I also cant make requests from my client with the new public keys. is there a duration of time I need to wait for the key rotation to take effect?
v
There is no documented waiting period for API key rotation to take effect. To ensure your new key is active, try refreshing your authentication and verify which key is being used:
Copy code
bash
vapi auth status
This will show the active account and API key in use. If issues persist, log out and log back in with the new key to force an update. For more details, see the [Vapi CLI authentication guide](https://docs.vapi.ai/cli/auth). Source: - [Vapi CLI authentication guide](https://docs.vapi.ai/cli/auth)
k
logged out and back in. still unresolved.
Resolved, based on another post:
Copy code
You have to add a public key with its default configurations for it to work.

Please hard refresh (Ctrl + Shift + R) your vapi dashboard before trying to make a test call.

For anyone else facing the same issue, please follow these steps to fix it.
Open Vapi dashboard -> API Keys -> Public API Keys
Create a public key, keep any name, **but make sure to leave the remaining options blank**

Click Create Public Token

Hard refresh the dashboard (Ctrl + Shift + R)

Navigate to your assistant -> Click "Talk to assistant" button on top right.
c
Glad it got resolved for you. Please let us know if any other issues. We are happy to help you
s
I still get 401 if i try to use it from my local machine
{"message":"Invalid Key. Hot tip, you may be using the private key instead of the public key, or vice versa.","error":"Unauthorized","statusCode":401}%
but sure i copied the public keys
c
Do you have call id for same issue, we can look into?
also to mention I do see you shared steps above, I am sharing again incase any steps missed, usually for these issues: 1. Go to Vapi Dashboard → API Keys → Public API Keys 2. Create a new Public API key • You can use any name • Leave the remaining options blank (default settings) 3. Click Create Public Token 4. Perform a hard refresh of the dashboard • Windows: Ctrl + Shift + R • Mac: Cmd + Shift + R 5. Navigate back to your assistant and click “Talk to Assistant” This forces the dashboard to fetch a fresh public key and resolves the “Invalid Key” error in most cases.