No API key found in request.

no 'apikey' request header or url param was found.
I'm completely new to supabase and js so I was mostly asking chatgpt but it doesn't work for this

in js:
const supabaseURL = "myurl";
const supabaseKey = "secret key";
const supabaseClient = supabase.createClient(supabaseURL, supabaseKey);

(async () => {
  const { data, error } = await supabaseClient.from("profiles").select("*");
  console.log("Test data:", data, "Error:", error);
})();


In html:
 <script src="https://unpkg.com/@supabase/supabase-js@2"></script>
    <script src="myjs.js"></script>
Was this page helpful?