API Key pk-
# support
g
Hi Vapi Support — I’m trying to start a Web Call using the Web SDK / widget, but I can’t get a working API key. In Dashboard → Settings → API Keys: When I click Add API key (Public or Private) and then Reveal / Copy, the value I receive is always a UUID (e.g. 598d693f-ac3d-45ef-bb8e-388879000949) and never starts with pk- or sk-. When I use the Web Widget, I get: api.vapi.ai/call/web: Failed to load resource: 401 Unhandled error It looks like the dashboard is showing only key IDs, not the actual API keys, so I can’t authenticate Web Calls. Can you help enable/show the real pk-... public key (and sk-... private key) for my org or explain how to retrieve them? Thanks!
v
It looks like the Web Widget requires a public API key (format:
pk-...
) from your Vapi dashboard.
Normally, you should see and copy this key (not just a UUID) under API Keys. If you only see UUIDs and not the actual API keys, this is not expected—please contact Vapi support directly to resolve the dashboard issue. For reference, your widget code should look like:
Copy code
html
<vapi-widget
  public-key="pk-..."
  assistant-id="your-assistant-id"
  mode="chat"
></vapi-widget>
You must use the actual public key, not a UUID, for authentication to work. See the [official documentation](https://docs.vapi.ai/chat/web-widget) for details. Source: - [Web widget documentation](https://docs.vapi.ai/chat/web-widget)
c
Hi, could you please let me know where it mentions the pk_live or pk_test prefix? Thank you. Best, Vapi Support
Hi, could you please let me know where it mentions the pk_live or pk_test prefix? Thank you. Best, Vapi Support
g
nowhere thats the problem
s
Hi
Hi, Your API keys are actually working correctly. Vapi keys are UUIDs by design (e.g. 598d693f-ac3d-45ef-bb8e-388879000949). There are no pk- or sk- prefixes - those only appear as placeholders in some of our SDK docs, which I understand is confusing. The 401 error is likely because of one of these: You're copying the key ID instead of the key value - the dashboard shows both, and only the value works for authentication You're using a private key for a web call - web SDK calls require a public key To fix: Go to Dashboard → Organization Settings → API Keys Find your public key Click reveal/copy to get the key value (a UUID) Pass that into the SDK: import Vapi from "@Vapi-ai/web"; const vapi = new Vapi("your-public-key-uuid-here"); That should clear the 401. Let me know if it persists! Best, Vapi Support
3 Views