arun_13517
09/08/2025, 8:42 AMAI Evy
09/08/2025, 8:42 AMAI Evy
09/08/2025, 8:42 AMcreate-web-call endpoint from your server [(1) ]() . The endpoint requires using your Retell API Key, which is why you need to call it from the server instead of the client to protect the key from being exposed .
The access token obtained from this endpoint will be used in your frontend client code to start the call . Note that if you do not start the call within 30 seconds of obtaining the access token, Retell will invalidate it and the call will be marked with an error .
Here's the basic flow:
1. Your client code calls your server endpoint
2. Your server internally calls the create web call API to get the access token
3. Use the access token in your frontend to start the call with the Web SDK
Once you have the access token, you can start the call using:
javascript
await retellWebClient.startCall({
accessToken: createCallResponse.access_token,
}) ;AI Evy
09/08/2025, 8:42 AMAI Evy
09/08/2025, 8:42 AMarun_13517
09/08/2025, 9:02 AM