key doesn't allow assistant id
# support
u
Everybody's seen all of the post. With this error I've tried everything that you've mentioned. Created the new API keys, cleared the cache, did a hard reset. Still nothing. I see multiple people with this error and it's gone unresolved. Can anybody help here?
v
Try explicitly including the
assistantId
in your API call, as missing or incorrect assignment is a common cause of this error.
Here's a code example:
Copy code
javascript
const response = await vapi.calls.create({
  workflow: { id: "your-workflow-id" },
  assistantId: "your-assistant-id", // Make sure this is valid and assigned in the Vapi Dashboard
  to: "+1234567890"
});
Double-check that the assistant is assigned to your phone number in the Vapi Dashboard before retrying your call. For more details, see the [Discord discussion on this error](https://discord.com/channels/1211482211119796234/1367883431266095104). Source: - [Discord discussion about Assistant not valid error](https://discord.com/channels/1211482211119796234/1367883431266095104)
u
😡 This is not valid. I'm using the test call button inside of the platform. There's no API call that I'm making remotely. All this is done from inside the platform. To make it even worse, it's a workflow that was working, so I've imported a workflow that worked at 1 point. Now when I try to test call from the workflow, it provides the error.
l
This error usually means your API key isn’t linked to the assistant you’re trying to call. Even if you regenerated keys, you must explicitly add your assistant ID to the “allowed assistants” section in the API key settings. Go to: Dashboard → API Keys → Select your key → Enable “Allow specific assistants” → Add your assistant ID exactly as shown in your project. Also confirm that you’re using the correct assistant_id in the request body and not the thread ID or model ID by mistake. After updating the key permissions, wait a few seconds and try again — this fixes the issue in most cases.
u
I'm using a workflow, not an assistant. How would I change the assistant ID? When I'm using a workflow, it just does not make sense. Of course I've added all the assistance that are there. I've added all of them. And it still does not work. Please read this as I made it very clear. I followed all of these instructions and nothing's working.
c
Hi, currently workflow is under development.
u
Thank you for responding, I really appreciate it. Well then use this feedback it was working. It's not working now and I'm getting that error. I'm sure workflows works. Or you wouldn't have released it. I understand it might be in beta or still under development. However, if you can help me get back to a functioning workflow, that 'd be great.
c
Sure, we are working on it.
u
None of my agents work at all and I'm only testing from your interface. None of them work.
c
Hey, can you send me a screen recording video that walks through the issue you are facing? It would be easier for me to understand your issue and help you out with it.
u
Just so I can have something to test, I had to create a new account. Nothing worked inside of my account any longer, no matter what I did and I followed all the recommendations throughout the threads for the issue. https://www.loom.com/share/13cc4b2935814d85b06c750fc560ac95
c
First Step: Go to the VAPI dashboard Second Step: Go to the API Keys page Third Step: Scroll down to the Public Keys section Fourth Step: Select the default public key Fifth Step: Remove allowed assistant IDs, origins, allow transient assistants Sixth Step: Do a hard refresh Seventh Step: Try again making a call.