Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update webhooks add auth header to use service key

Joshen Lim8e64d5267461
diff --git a/studio/components/interfaces/Database/Hooks/HTTPRequestFields.tsx b/studio/components/interfaces/Database/Hooks/HTTPRequestFields.tsx
index 2e88aa24d02..9590ed80819 100644
--- a/studio/components/interfaces/Database/Hooks/HTTPRequestFields.tsx
+++ b/studio/components/interfaces/Database/Hooks/HTTPRequestFields.tsx
@@ -49,9 +49,9 @@ const HTTPRequestFields = ({
const edgeFunctions = functions ?? []
const apiService = settings?.autoApiService
- const anonKey = apiService?.service_api_keys.find((x) => x.name === 'anon key')
- ? apiService.defaultApiKey
- : '[YOUR ANON KEY]'
+ const anonKey = apiService?.service_api_keys.find((x) => x.name === 'service_role key')
+ ? apiService.serviceApiKey
+ : '[YOUR API KEY]'
return (
<>
@@ -170,9 +170,7 @@ const HTTPRequestFields = ({
}
>
<div className="space-y-1">
- <p className="block text-scale-1200">
- Add authorization header with anon key
- </p>
+ <p className="block text-scale-1200">Add auth header with service key</p>
<p className="text-scale-1000">
Required if your edge function enforces JWT verification
</p>