snippets.authKeyExample() — supabase Function Reference
Architecture documentation for the snippets.authKeyExample() function in Snippets.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/studio/components/interfaces/Docs/Snippets.ts lines 67–92
authKeyExample: (
defaultApiKey: string,
endpoint: string,
{ keyName, showBearer = true }: { keyName?: string; showBearer?: boolean }
) => ({
title: 'Example usage',
bash: {
language: 'bash',
code: `
curl '${endpoint}/rest/v1/' \\
-H "apikey: ${defaultApiKey}" ${
showBearer
? `\\
-H "Authorization: Bearer ${defaultApiKey}"`
: ''
}
`,
},
js: {
language: 'js',
code: `
const SUPABASE_URL = "${endpoint}"
const supabase = createClient(SUPABASE_URL, process.env.${keyName || 'SUPABASE_KEY'});
`,
},
}),
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free