Create web calls from client
# support
j
Hi, when I checked the API Docs I could only find the /call/phone endpoint which requires a real phone number. When I checked the Web SDK I stumbled upon /call/web, this endpoint is undocumented though. My plan was to modify the web sdk to allow joining a Daily meeting by overriding the webcallUrl it uses internally. Is this way supported, recommended and is there possibly any easier way
v
Hi @JuzTim, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Web SDK]() * [Create Phone Call]() * [Vapi Web SDK]() * [Web Calling]() -----------------------------
### Answer The
/call/web
endpoint is not recommended for direct use. It's intended to be used via the Web SDK or other provided tools, rather than calling it directly via custom modifications [(1)]() [(2)]() . To create and manage web calls, you should use the Web SDK. Here is how you can get started with the Web SDK: 1. **Installation**:
Copy code
bash
    yarn add @vapi-ai/web
or
Copy code
bash
    npm install @vapi-ai/web
2. **Usage**:
Copy code
javascript
    import Vapi from '@vapi-ai/web';

    const vapi = new Vapi('your-public-key');

    vapi.start({
        model: {
            provider: "openai",
            model: "gpt-3.5-turbo",
            messages: [
                {
                    role: "system",
                    content: "You are an assistant.",
                },
            ],
        },
        voice: {
            provider: "11labs",
            voiceId: "burt",
        },
    });
3. **Listening to Events**:
Copy code
javascript
    vapi.on('call-start', () => {
        console.log('Call has started');
    });

    vapi.on('call-end', () => {
        console.log('Call has ended');
    });

    vapi.on('message', (message) => {
        console.log(message);
    });
For more detailed information, you can refer to the Web SDK documentation [(3)]() [(4)]() [(5)]() [(6)]() [(7)]() .
j
I don't want to use the web sdk to create web calls.
v
Thanks for the follow-up, @JuzTim. I'll get back to you soon.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Web SDK]() * [Create Phone Call]() * [Vapi Web SDK]() * [Vapi iOS SDK]() -----------------------------
### Answer Directly using the
/call/web
endpoint is not documented or recommended. The intended approach is through the Web SDK. If you choose to proceed without the Web SDK, you may encounter issues with support or stability that aren't addressed in the documentation. For more details on supported methods, you can refer to these sources: - [Vapi Web SDK]() [(1)]() - [Create Phone Call]() [(2)]()
Got it. Tagging @User for additional help.
j
Creating the webcalls from the client is a bit of a problem for us because we need control over which clients can initiate calls and which cant
s
It is not meant for directly called you will need to use any SDK for it. That's why it is hidden.
j
what could we do in our usecase then
we need individual access on a per-user level to the call functionality
v
Got it. Tagging @User for additional help.
s
@JuzTim can you dm me your proper usecase so that i can help you?
with examples
j
sent
6 Views