Basic Webhook question for someone new to coding :...
# support
s
Hey folks! Trying out building my first proper web app and I'm struggling to set up the Vapi webhook. I've set up my server through Supabase (I also have it running on AWS so I could switch the server, but I prefer Supabase edge functions tbh). Here are the problems I'm having: - OAuth2 credentials are not saving (these are the exact clientI D and client Secret I have in my code - I'm still able to get an access token when I test the OAuth2 call, but when I test the webhook it returns "error: unauthorized" - I'm not sure if I need to include the access token in the test playground when making a request? It doesn't seem to let me Including the error I'm getting when trying to save OAuth2 credentials + the test playground I have. Any help would be incredibly appreciated! Test Playground Request // Server Message (POST /server) const response = await fetch("https://lbwfxsazunpucvvbihwr.supabase.co/functions/v1/vapi-webhook/server", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "message": { "type": "end-of-call-report", "analysis": { "summary": "test_SUMMARY", "structuredData": { "ug": "BU", "current_org": "Sesame Street" } }, "artifact": { "recordingUrl": "https://www.record.url" }, "cost": 3.14, "endedReason": "assistant-ended-call", "customer": { "number": "+123978465" }, "startedAt": "2025-01-04T15:59:19.082Z", "endedAt": "2025-01-04T14:59:00.000Z" } }), }); const body = await response.json(); console.log(body); Test Playground Response
Copy code
{
  "error": "Unauthorized"
}
https://cdn.discordapp.com/attachments/1325136785625579561/1325136786107666533/Screenshot_2025-01-04_at_11.14.52_AM.png?ex=677ab14d&is=67795fcd&hm=4aecd6016008b0c3afc21e63d1c2a09a269b16f4067d31c5aeae745a469d6640&
s
@Sahil Sorry for the late response. Are you still experiencing this problem? If so, could you send over a loom video so I can take a look?
Because of no response closing this ticket!!
7 Views