Need help with BuildWithVapi
# support
r
Having trouble with Initializing the call - Tried using both Public and private keys -- Facing 400,401 or 404 errors -- It keeps on loop with these 3 -- After entering a phone number - I'm not getting the call - can you please help? #buildwithvapi
v
Make sure you are using your Public API key (not the private key) when initializing the Vapi client in your web app. For example:
Copy code
js
import Vapi from '@vapi-ai/web';
const vapi = new Vapi('YOUR_PUBLIC_API_KEY');
Double-check that your assistant and phone number are set up and active in the Vapi dashboard. Using the wrong key or an invalid assistant/phone number can cause 400/401/404 errors. Sources: - [Vapi Web SDK Documentation](https://docs.vapi.ai/sdk/web) - [Vapi Quickstart Guide](https://docs.vapi.ai/quickstart/dashboard)
r
Used public key - getting 400 error, used private key - getting 401 error
k
Send your workflow id
r
sure
Sorry my bad -- haven't initiated a workflow yet -- I just created a test phone number and I've my project settings -- Do I need to create workflow ID before I start testing calls out?
k
You need to create and assign a workflow assistant to your phone number before testing calls without it, the call won’t work and you’ll see 400/401/404 errors. Make sure you’re using the correct assistant Id, phoneNumber Id, and a valid API key in your request..
2 Views