Javascript Reference v1.0

Invokes a Supabase Edge Function.

Invokes a function

Invokes a Supabase Edge Function.

  • Requires an Authorization header.
  • Invoke params generally match the Fetch API spec.
Parameters
    functionName
    REQUIRED
    string

    The name of the Function to invoke.

    options
    Optional
    FunctionInvokeOptions

    Options for invoking the Function.


const { data, error } = await supabase.functions.invoke('hello', {
  body: JSON.stringify({ foo: 'bar' })
})