Supabase.Functions 8.0.0

dotnet add package Supabase.Functions --version 8.0.0
                    
NuGet\Install-Package Supabase.Functions -Version 8.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Supabase.Functions" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Supabase.Functions" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Supabase.Functions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Supabase.Functions --version 8.0.0
                    
#r "nuget: Supabase.Functions, 8.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Supabase.Functions@8.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Supabase.Functions&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Supabase.Functions&version=8.0.0
                    
Install as a Cake Tool

Supabase.Functions

Build and Test NuGet License: MIT

A C# client for invoking Supabase Edge Functions.

Part of the Supabase C# SDK. Most projects use it through the Supabase meta-package (supabase.Functions); reference this package directly when you only need to invoke functions.

Installation

dotnet add package Supabase.Functions

Targets .NET Standard 2.0.

Getting started

Create a client pointed at your project's Functions URL, then invoke a function by name:

using Supabase.Functions;

var client = new Client("https://PROJECT_ID.supabase.co/functions/v1");

// Invoke and read the raw string response.
var body = await client.Invoke("hello-world", token: SUPABASE_ANON_KEY);

Invoke needs a bearer token to authorize the request — your project's anon key, or a user's access token. Through the Supabase meta-package the token is supplied for you.

Deserializing the response

Use the generic overload to deserialize the JSON body into a type:

var result = await client.Invoke<MyResponse>("hello-world", token: SUPABASE_ANON_KEY);

Passing a body, headers, method, or region

InvokeFunctionOptions covers the common per-call settings:

var options = new Client.InvokeFunctionOptions
{
    Body = new Dictionary<string, object> { { "name", "world" } },
    Headers = new Dictionary<string, string> { { "x-trace", "abc" } },
    HttpMethod = HttpMethod.Post,
    FunctionRegion = FunctionRegion.UsEast1
};

var result = await client.Invoke<MyResponse>("hello-world", token: SUPABASE_ANON_KEY, options);

Observability (OpenTelemetry)

The client emits traces and metrics through System.Diagnostics, so you can wire them into OpenTelemetry (or any ActivityListener / MeterListener) without taking a dependency on the OpenTelemetry packages. Emission is zero-cost while nothing is listening, so it is always on and stays silent until you subscribe.

Register the client's ActivitySource and Meter by name. Use the FunctionsDiagnostics.SourceName constant rather than hardcoding the string, so a typo becomes a compile error instead of a silent no-op:

using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;
using Supabase.Functions;

// Requires OpenTelemetry.Extensions.Hosting and an exporter package (e.g. OTLP) in your app.
builder.Services.AddOpenTelemetry()
    .WithTracing(tracing => tracing
        .AddSource(FunctionsDiagnostics.SourceName)
        .AddOtlpExporter())
    .WithMetrics(metrics => metrics
        .AddMeter(FunctionsDiagnostics.SourceName)
        .AddOtlpExporter());

Once subscribed you get:

  • A client span per invocation, named {METHOD} {path} and following OpenTelemetry HTTP conventions (method, status code, and a sanitized URL — the query string is never recorded, and neither is the request body). A faas.invoked_name tag carries the invoked function name. A relay error is reported as a failed span even when the HTTP status is a success.
  • A supabase.functions.invoke.duration histogram (seconds), tagged with method, host, path, function name, and status code.

If you are not using the OpenTelemetry SDK, a raw listener works too:

using System.Diagnostics;
using Supabase.Functions;

using var listener = new ActivityListener
{
    ShouldListenTo = source => source.Name == FunctionsDiagnostics.SourceName,
    Sample = (ref ActivityCreationOptions<ActivityContext> _) => ActivitySamplingResult.AllData,
    ActivityStopped = activity => Console.WriteLine($"{activity.OperationName} {activity.Duration.TotalMilliseconds}ms {activity.Status}")
};
ActivitySource.AddActivityListener(listener);

Contributing

Contributions are welcome. See the repository root for how to build and test the SDK.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Supabase.Functions:

Package Downloads
Supabase

A C# implementation of the Supabase client

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0 180 9/3/2026
2.2.0 15,516 7/22/2026
2.1.1 3,736 7/16/2026
2.1.0 1,966 5/16/2025
2.0.0 744,975 4/21/2024