Skip to content

Invoking RPC results in exception 'No API key found in request' #39

@orhanmaden

Description

@orhanmaden

Bug report

Describe the bug

Exception is thrown when using invoking RPC call.

To Reproduce

  1. Create procedure via supabase SQL Editor
CREATE OR REPLACE FUNCTION test(
	inputText text) RETURNS text AS
$$
	SELECT inputText;
$$ LANGUAGE 'sql';
  1. Run supabase-csharp
const string URL = "";
const string KEY = "";
var client = new Supabase.Client(URL, KEY, new Supabase.SupabaseOptions { AutoConnectRealtime = true, });
await client.InitializeAsync();

var dict = new Dictionary<string, object>();
dict.Add("inputText ", "Hello World!");

var response = await client.Rpc("public.test", dict);
  1. See the exception
Postgrest.RequestException: No API key found in request
   at Postgrest.Helpers.MakeRequest(ClientOptions clientOptions, HttpMethod method, String url, JsonSerializerSettings serializerSettings, Object data, Dictionary`2 headers, CancellationToken cancellationToken)
   at UserQuery.Main() in C:\path\to\file:line 10

Expected behavior

Invoke RPC call successful.

Screenshots

N/A

System information

  • OS: Windows
  • Version of supabase-charp: 0.6.1

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions