Skip to content

Commit 8fd8303

Browse files
Add comment about public API key use on Docusaurus (#3567)
# Description of Changes Following discussions about having our Inkeep's API key being public, I added a comment to all the places where we use it saying that this is OK and a link to the documentation. As per Inkeep's documentation: > When you embed your AI assistant in websites where the user is not authenticated, like in your public docs, help center, or marketing site, the web browser is considered a "public client". Since many of these clients often don't have a backend, the most practical way to use the AI assistant is for UI components to talk directly to the Inkeep service. While it is up to your company's own policies and best practices, in these scenarios, the Inkeep API key is generally ok to be included in the source code of your web page that is exposed in the browser. This is similar to how [Algolia's search service](https://support.algolia.com/hc/en-us/articles/18966776061329-Can-the-search-API-key-be-public) or [Sentry's error logging](https://forum.sentry.io/t/how-does-sentry-prevent-spammers/8188) works. https://docs.inkeep.com/cloud/ui-components/public-api-keys#public-clients # API and ABI breaking changes None # Expected complexity level and risk 1 # Testing Ran the docs locally to ensure that the comment isn't visible on the markdown pages
1 parent 565e95b commit 8fd8303

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/docs/00-Ask AI/01-ask-ai.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ hide_title: true
77

88
import { InkeepEmbeddedChat } from '@inkeep/cxkit-react';
99

10+
<!-- This API key is public, it's okay to have it in client code, https://docs.inkeep.com/cloud/ui-components/public-api-keys#public-clients -->
11+
1012
<InkeepEmbeddedChat
1113
shouldAutoFocusInput={true}
1214
baseSettings={{

docs/docusaurus.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ shikiTheme.colors!['editor.background'] =
3232

3333
const inkeepConfig: Partial<InkeepConfig> = {
3434
baseSettings: {
35+
// This API key is public, it's okay to have it in client code, https://docs.inkeep.com/cloud/ui-components/public-api-keys#public-clients
3536
apiKey: '13504c49fb56b7c09a5ea0bcd68c2b55857661be4d6d311b',
3637
organizationDisplayName: 'SpacetimeDB',
3738
primaryBrandColor: '#4cf490',
@@ -93,7 +94,8 @@ const config: Config = {
9394
'classic',
9495
{
9596
docs: {
96-
editUrl: "https://github.com/clockworklabs/SpacetimeDB/edit/master/docs/",
97+
editUrl:
98+
'https://github.com/clockworklabs/SpacetimeDB/edit/master/docs/',
9799
routeBasePath: '/',
98100
sidebarPath: './sidebars.ts',
99101
sidebarCollapsed: false,

0 commit comments

Comments
 (0)