tahutipai0940
# office-hours
t
hi @Vapi if I am creating a web site, where the user can talk to Vapi by voice, I can see two architecture options: 1) I can create a server-side python program, where the API keys are stored. the client webpage would create a connection to my server via the python vapi api, and that would "send" the call to Vapi services. (no api keys exposed to client) or 2) The client side javascript code can create the call directly to vapi servers. this esposes the vapi public key to the internet which is best and why? explain the pros and cons of each
@Vapi are you there?
v
@Tahutipai Yes, I'm here! How can I assist you today with VAPI?
t
if I am creating a web site, where the user can talk to Vapi by voice, I can see two architecture options: 1) I can create a server-side python program, where the API keys are stored. the client webpage would create a connection to my server via the python vapi api, and that would "send" the call to Vapi services. (no api keys exposed to client) or 2) The client side javascript code can create the call directly to vapi servers. this esposes the vapi public key to the internet which is best and why? explain the pros and cons of each
@Vapi if I am creating a web site, where the user can talk to Vapi by voice, I can see two architecture options: 1) I can create a server-side python program, where the API keys are stored. the client webpage would create a connection to my server via the python vapi api, and that would "send" the call to Vapi services. (no api keys exposed to client) or 2) The client side javascript code can create the call directly to vapi servers. this esposes the vapi public key to the internet which is best and why? explain the pros and cons of each
@Vapi for a website where the client can talk to vapi, should i implement that as server-side code? (for the voice connection), or, should the voice connection be done client side?
@Vapi why are you not answering my question?
@Vapi how do i request a jwt from vapi?
v
@Tahutipai To request a JWT (JSON Web Token) from VAPI, you would typically need to have a server-side component that communicates with the VAPI authentication service. This is because generating a JWT often requires sensitive information like a private key or a secret, which should not be exposed on the client side. Here's a general outline of the steps you would take: 1. Set up a server-side endpoint in your application that can handle a request for a JWT. 2. Within this endpoint, use your server-side VAPI SDK or directly make an HTTP request to the VAPI authentication endpoint, including your API credentials (like your private key or secret) in the request. 3. The VAPI service will respond with a JWT if your credentials are valid. 4. Your server endpoint should then send this JWT back to the client. 5. The client can use this JWT to authenticate with VAPI services directly from the client side. Please note that the exact implementation details can vary based on the specific VAPI service you're using, and you should refer to the VAPI documentation for the precise steps and requirements. If you need the actual code or commands to request a JWT from VAPI, please provide me with the specific details or documentation of the VAPI service you're using, as the process can vary between different APIs and services. If this is not available, you may need to ask support for more info on this.
t
@User what is the vapi endpoint for jwt generation?
s
@Tahutipai you can use public key and limit to specific origins.
t
thankyou!
2 Views