:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(workflows): correct API key label and transactional email host (#120394)
Harley Alexander90bcd7007150
diff --git a/frontend/src/scenes/settings/project/projectSecretAPIKeysLogic.tsx b/frontend/src/scenes/settings/project/projectSecretAPIKeysLogic.tsxindex 4220d1ed55d1..a95a19d5e0cf 100644--- a/frontend/src/scenes/settings/project/projectSecretAPIKeysLogic.tsx+++ b/frontend/src/scenes/settings/project/projectSecretAPIKeysLogic.tsx@@ -9,6 +9,7 @@ import api from 'lib/api'import { CodeSnippet } from 'lib/components/CodeSnippet'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'import {+ API_SCOPES,PROJECT_SECRET_API_KEY_ALLOWED_API_SCOPE_ACTION,PROJECT_SECRET_API_KEY_SCOPE_PRESETS,ProjectSecretAPIKeyAllowedScope,@@ -369,7 +370,10 @@ export const projectSecretAPIKeysLogic = kea<projectSecretAPIKeysLogicType>([}const scopes = Array.from(allowedByKey.entries()).map(([key, allowed]) => ({key,- label: PROJECT_SECRET_SCOPE_OBJECT_NAMES[key] ?? capitalizeFirstLetter(key.replace(/_/g, ' ')),+ label:+ PROJECT_SECRET_SCOPE_OBJECT_NAMES[key] ??+ API_SCOPES.find((scope) => scope.key === key)?.objectName ??+ capitalizeFirstLetter(key.replace(/_/g, ' ')),disabledActions: allActions.filter((a) => !allowed.has(a)),}))return scopes.filter((scope) => scopeMatchesSearch(scope, searchTerm))diff --git a/products/workflows/frontend/TemplateLibrary/TransactionalEmailApiExample.tsx b/products/workflows/frontend/TemplateLibrary/TransactionalEmailApiExample.tsxindex ed76413c1fe6..587b873a72a7 100644--- a/products/workflows/frontend/TemplateLibrary/TransactionalEmailApiExample.tsx+++ b/products/workflows/frontend/TemplateLibrary/TransactionalEmailApiExample.tsx@@ -3,13 +3,12 @@ import { useValues } from 'kea'import { Link } from '@posthog/lemon-ui'import { CodeSnippet, Language } from 'lib/components/CodeSnippet'-import { apiHostOrigin } from 'lib/utils/apiHost'import { teamLogic } from 'scenes/teamLogic'import { urls } from 'scenes/urls'export function TransactionalEmailApiExample({ templateId }: { templateId: string }): JSX.Element {const { currentTeamIdStrict } = useValues(teamLogic)- const snippet = `curl -X POST ${apiHostOrigin()}/api/projects/${currentTeamIdStrict}/messaging_templates/${templateId}/send/ \\+ const snippet = `curl -X POST ${window.location.origin}/api/projects/${currentTeamIdStrict}/messaging_templates/${templateId}/send/ \\-H "Authorization: Bearer $POSTHOG_PROJECT_SECRET_API_KEY" \\-H "Content-Type: application/json" \\-d '{