© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
3 replies
Staffan Solin

Cant access SUPABASE_URL from my Edge function

I am trying to access my Supabase environment variables from my edge function like this
  const supabase = await createClient(
    Deno.env.get(SUPABASE_URL),
    Deno.env.get(SUPABASE_SERVICE_ROLE_KEY),
    {
      auth: {
        autoRefreshToken: false,
        persistSession: false,
      },
    }
  );
  const supabase = await createClient(
    Deno.env.get(SUPABASE_URL),
    Deno.env.get(SUPABASE_SERVICE_ROLE_KEY),
    {
      auth: {
        autoRefreshToken: false,
        persistSession: false,
      },
    }
  );

But getting error like:
ReferenceError: SUPABASE_URL is not defined
ReferenceError: SUPABASE_URL is not defined
what am I missing?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Supabase edge function issue
SupabaseSSupabase / help-and-questions
3w ago
Cant deploy edge function
SupabaseSSupabase / help-and-questions
3y ago
Edge function, custom domain and `SUPABASE_URL` env variable
SupabaseSSupabase / help-and-questions
13mo ago
Meaningless errors from supabase edge functions
SupabaseSSupabase / help-and-questions
8mo ago