Suxxy
05/30/2026, 10:41 PMAI Evy
05/30/2026, 10:42 PMAI Evy
05/30/2026, 10:42 PMAI Evy
05/30/2026, 10:42 PMX-Retell-Signature header [(3) ]()
Here's the verification code for custom functions:
javascript
import { Retell } from "retell-sdk";
import express from "express";
const app = express() ;
// Use raw body for signature verification, not JSON.stringify(req.body) .
app.use(express.raw({ type: "application/json" }) ) ;
app.post("/check-weather", async (req, res) => {
const rawBody = req.body.toString("utf-8") ;
if (
!Retell.verify(
rawBody,
process.env.RETELL_API_KEY,
req.headers["x-retell-signature"],
)
) {
console.error("Invalid signature") ;
return;
}
const content = JSON.parse(rawBody) ;
if (content.args.city === "New York") {
return res.json("25f and sunny") ;
} else {
return res.json("20f and cloudy") ;
}
}) ;AI Evy
05/30/2026, 10:42 PMpython
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from retell import Retell
retell = Retell(api_key=os.environ["RETELL_API_KEY"])
@app.post("/check-weather")
async def check-weather(request: Request) :
try:
raw_body = (await request.body() ) .decode("utf-8")
valid_signature = retell.verify(
raw_body,
api_key=str(os.environ["RETELL_API_KEY"]) ,
signature=str(request.headers.get("X-Retell-Signature") ) ,
)
if not valid_signature:
print("Received Unauthorized")
return JSONResponse(status_code=401, content={"message": "Unauthorized"})
post_data = json.loads(raw_body)
args = post_data["args"]
if args["city"] == "New York":
return JSONResponse(status_code=200, content={"result": "25f and sunny"})
else:
return JSONResponse(status_code=200, content={"result": "20f and cloudy"})
except Exception as err:
print(f"Error in webhook: {err}")
return JSONResponse(
status_code=500, content={"message": "Internal Server Error"}
)
If the built-in Cal.com integration continues to fire after deletion, try rotating your Cal.com API key [(1) ]() . One user reported needing to create a workaround using Make.com to handle Cal.com API calls externally when the built-in integration had issues .AI Evy
05/30/2026, 10:42 PM