SupabaseS
Supabase3mo ago
Emil

403 when invoking sb edge function from vercel function

Hi,
I am build a vercel function to redirect users. The final url is beeing processed based on data from a supabase table. In order to access that table, i wrote a simple edge function on supabase which basically takes an id and returns a "matching" string.

The problem is that, when invoking this function from the vercel function, i get an 403 from supabase. When i invoke the function in my frontend though (where I am a logged in user), it works.

I've already tried calling it with anon and service role keys and set the verify_jwt to false, but it still doesn't work.

Any ideas on how to solve this? This is how i invoke, the client is build with the anon key from my supabase:

const { data, error } = await supabase.functions.invoke(
    "admin/getCustomerUrlFromIdent",
    {
        body: { ident: deviceIdent },
    }
);


Thanks in advance!
Was this page helpful?