Public and private keys, HMAC signing, and how to authenticate every request
Every InsightAI tenant gets three credentials at creation time (see SDKs & Integration for how to generate them). Each has a distinct purpose — using the wrong one for the wrong call is the most common integration mistake, so read this before wiring anything up.
Identifying your tenant on dashboard/admin-facing REST calls
Authorization: Bearer header
Private HMAC secret
Opaque 32+ char string
Signing every telemetry payload the SDK sends
SDK config, never sent over the wire itself
Webhook signing secret
Opaque 32+ char string
Verifying payloads InsightAI sends back to your webhook endpoint
Your webhook handler, to verify X-InsightAI-Signature
The private HMAC secret and webhook signing secret should never be embedded in client-side code beyond the SDK’s own signing logic, and never logged. The SDK signs locally — the raw secret itself doesn’t need to leave the device except inside the signature computation.
Verifying inbound webhooks (InsightAI → your backend)
When InsightAI delivers a risk.alert event to your configured webhook URL (see Webhooks & Payload Reference), verify the signature before processing the payload — never act on an unverified webhook body.
Compute the signature over the raw, unparsed request body — not a re-serialized version of the parsed JSON. Re-serializing can change key ordering or whitespace and produce a signature mismatch even for a genuinely valid payload.
Both the HMAC secret and webhook signing secret can be rotated from the DI Dashboard under Admin → Integrations → [your tenant] → Rotate keys. Rotating invalidates the old secret immediately — coordinate a deploy so your SDK config and webhook verification update together, since there’s no overlap window where both old and new secrets are valid simultaneously.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"InsightAI Documentation","colors":{"primary":"#44acdc","light":"#8bccf2","dark":"#44acdc"},"favicon":"https://mintcdn.com/docs-insightsecure-ai/QLIQO8pSq1tDk-0P/favicon.svg?fit=max\u0026auto=format\u0026n=QLIQO8pSq1tDk-0P\u0026q=85\u0026s=cee0dd86a9f6e4b9379311e08112d75d","logo":{"light":"https://mintcdn.com/docs-insightsecure-ai/QLIQO8pSq1tDk-0P/logo/app_logo.png?fit=max\u0026auto=format\u0026n=QLIQO8pSq1tDk-0P\u0026q=85\u0026s=bdbb5dfb8e880b1aa6763637b23c26ae","dark":"https://mintcdn.com/docs-insightsecure-ai/QLIQO8pSq1tDk-0P/logo/app_logo.png?fit=max\u0026auto=format\u0026n=QLIQO8pSq1tDk-0P\u0026q=85\u0026s=bdbb5dfb8e880b1aa6763637b23c26ae"},"navbar":{"links":[{"label":"Support","href":"mailto:akash@insightai.in"}],"primary":{"type":"button","label":"DI Dashboard","href":"https://deviceintel.insightsecure.ai/di/dashboard"}},"footer":{"socials":{"x":"https://twitter.com/getInsightAI","linkedin":"https://www.linkedin.com/company/insightai-technologies"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Company","href":"https://insightai.in","icon":"building"},{"anchor":"InsightSecure","href":"https://insightsecure.ai","icon":"shield-halved"},{"anchor":"DI Dashboard","href":"https://deviceintel.insightsecure.ai/di/dashboard","icon":"gauge"},{"anchor":"Blog","href":"https://www.linkedin.com/company/insightai-technologies/posts/?feedView=articles","icon":"newspaper"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"docs-insightsecure-ai","hasAudioNarration":false,"actualSubdomain":"docs-insightsecure-ai","customDomains":["docs.insightsecure.ai"],"gitSource":{"type":"github","owner":"insightai-pinnacle-technologies","repo":"mintlify_docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aea2176683852a16950ac32:success","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Documentation","count":11},{"language":"default","tag":"API Reference","count":6},{"language":"default","tag":"Device Intelligence","count":6},{"language":"default","tag":"AML Case Investigation","count":3},{"language":"default","tag":"API Documentation","count":3},{"language":"default","tag":"Device Intelligence APIs","count":3},{"language":"default","tag":"Get Started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/authentication","slug":"/api-reference/authentication","pageMetadata":{"title":"Authentication","description":"Public and private keys, HMAC signing, and how to authenticate every request","href":"/api-reference/authentication"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Public and private keys, HMAC signing, and how to authenticate every request\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Every InsightAI tenant gets three credentials at creation time (see `,_jsx(_components.a,{href:`/device-intelligence/sdks#getting-your-credentials`,children:`SDKs \u0026 Integration`}),` for how to generate them). Each has a distinct purpose — using the wrong one for the wrong call is the most common integration mistake, so read this before wiring anything up.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-three-credentials`,children:`The three credentials`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Credential`}),_jsx(_components.th,{children:`Format`}),_jsx(_components.th,{children:`Used for`}),_jsx(_components.th,{children:`Where it’s used`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Public API key`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`dpk_live_...`}),` / `,_jsx(_components.code,{children:`dpk_sandbox_...`})]}),_jsx(_components.td,{children:`Identifying your tenant on dashboard/admin-facing REST calls`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Authorization: Bearer`}),` header`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Private HMAC secret`})}),_jsx(_components.td,{children:`Opaque 32+ char string`}),_jsx(_components.td,{children:`Signing every telemetry payload the SDK sends`}),_jsx(_components.td,{children:`SDK config, never sent over the wire itself`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Webhook signing secret`})}),_jsx(_components.td,{children:`Opaque 32+ char string`}),_jsx(_components.td,{children:`Verifying payloads InsightAI sends back to your webhook endpoint`}),_jsxs(_components.td,{children:[`Your webhook handler, to verify `,_jsx(_components.code,{children:`X-InsightAI-Signature`})]})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`private HMAC secret`}),` and `,_jsx(_components.strong,{children:`webhook signing secret`}),` should never be embedded in client-side code beyond the SDK’s own signing logic, and never logged. The SDK signs locally — the raw secret itself doesn’t need to leave the device except inside the signature computation.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`signing-outbound-telemetry-sdk-→-insightai`,children:`Signing outbound telemetry (SDK → InsightAI)`}),`\n`,_jsx(_components.p,{children:`Every telemetry payload the SDK sends is signed with HMAC-SHA256, using your private HMAC secret, over the raw JSON request body:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`X-InsightAI-Signature: base64(HMAC-SHA256(raw_request_body, hmac_secret))`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Your SDK config handles this automatically — you only need to supply the secret:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`InsightAiConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tenantId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your_tenant_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmacSecretKey `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your_private_hmac_secret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`If you’re calling the ingest API directly (outside an SDK, e.g. from a server-side integration), sign it yourself:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac, hashlib, base64, json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`body `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json.dumps(payload, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`separators`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\",\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\":\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)).encode()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`signature `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base64.b64encode(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac.new(hmac_secret.encode(), body, hashlib.sha256).digest()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).decode()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-InsightAI-Signature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: signature,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` crypto`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'crypto'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` signature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createHmac`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sha256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hmacSecret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`digest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'base64'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-InsightAI-Signature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`verifying-inbound-webhooks-insightai-→-your-backend`,children:`Verifying inbound webhooks (InsightAI → your backend)`}),`\n`,_jsxs(_components.p,{children:[`When InsightAI delivers a `,_jsx(_components.code,{children:`risk.alert`}),` event to your configured webhook URL (see `,_jsx(_components.a,{href:`/api-reference/webhooks-and-payload`,children:`Webhooks \u0026 Payload Reference`}),`), verify the signature `,_jsx(_components.strong,{children:`before`}),` processing the payload — never act on an unverified webhook body.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac, hashlib, base64`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` verify_webhook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`raw_body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signature_header`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`webhook_secret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` expected `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base64.b64encode(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac.new(webhook_secret.encode(), raw_body, hashlib.sha256).digest()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ).decode()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\" # Constant-time comparison — never use `==` for signature checks\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac.compare_digest(expected, signature_header)`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Compute the signature over the `,_jsx(_components.strong,{children:`raw, unparsed`}),` request body — not a re-serialized version of the parsed JSON. Re-serializing can change key ordering or whitespace and produce a signature mismatch even for a genuinely valid payload.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`rest-api-calls-dashboard/admin-endpoints`,children:`REST API calls (dashboard/admin endpoints)`}),`\n`,_jsx(_components.p,{children:`Use your public API key as a bearer token:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.insightsecure.ai/v1/di/alerts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer dpk_live_...\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`key-rotation`,children:`Key rotation`}),`\n`,_jsxs(_components.p,{children:[`Both the HMAC secret and webhook signing secret can be rotated from the DI Dashboard under `,_jsx(_components.strong,{children:`Admin → Integrations → [your tenant] → Rotate keys`}),`. Rotating invalidates the old secret immediately — coordinate a deploy so your SDK config and webhook verification update together, since there’s no overlap window where both old and new secrets are valid simultaneously.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Authentication","description":"Public and private keys, HMAC signing, and how to authenticate every request","href":"/api-reference/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The three credentials","slug":"the-three-credentials","depth":2,"children":[]},{"title":"Signing outbound telemetry (SDK → InsightAI)","slug":"signing-outbound-telemetry-sdk-→-insightai","depth":2,"children":[]},{"title":"Verifying inbound webhooks (InsightAI → your backend)","slug":"verifying-inbound-webhooks-insightai-→-your-backend","depth":2,"children":[]},{"title":"REST API calls (dashboard/admin endpoints)","slug":"rest-api-calls-dashboard/admin-endpoints","depth":2,"children":[]},{"title":"Key rotation","slug":"key-rotation","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"docs-insightsecure-ai","siteName":"InsightAI Documentation","title":"Authentication - InsightAI Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-03T09:48:41.191Z","originalFileLocation":"api-reference/authentication.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Public and private keys, HMAC signing, and how to authenticate every request\">\u003cmeta data-mint-head name=\"application-name\" content=\"InsightAI Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - InsightAI Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Public and private keys, HMAC signing, and how to authenticate every request\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"InsightAI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.insightsecure.ai/api-reference/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs-insightsecure-ai.mintlify.site/_mintlify/api/og/v2?division=API+Documentation\u0026amp;title=Authentication\u0026amp;description=Public+and+private+keys%2C+HMAC+signing%2C+and+how+to+authenticate+every+request\u0026amp;theme=f0f261c5cf6218a45230b7ea\u0026amp;signature=6a39be9f490d6b47ba96ed5906c766a7a0ac2da33c2638caccb10dce34c04636\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Authentication - InsightAI Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Public and private keys, HMAC signing, and how to authenticate every request\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs-insightsecure-ai.mintlify.site/_mintlify/api/og/v2?division=API+Documentation\u0026amp;title=Authentication\u0026amp;description=Public+and+private+keys%2C+HMAC+signing%2C+and+how+to+authenticate+every+request\u0026amp;theme=f0f261c5cf6218a45230b7ea\u0026amp;signature=6a39be9f490d6b47ba96ed5906c766a7a0ac2da33c2638caccb10dce34c04636\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/docs-insightsecure-ai/S_X7AjWr-kRJn1Ew/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"InsightAI Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#44acdc\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.insightsecure.ai/api-reference/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.insightsecure.ai/#organization\",\"name\":\"InsightAI Documentation\",\"url\":\"https://docs.insightsecure.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/docs-insightsecure-ai/QLIQO8pSq1tDk-0P/logo/app_logo.png?fit=max\u0026auto=format\u0026n=QLIQO8pSq1tDk-0P\u0026q=85\u0026s=bdbb5dfb8e880b1aa6763637b23c26ae\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.insightsecure.ai#website\",\"name\":\"InsightAI Documentation\",\"url\":\"https://docs.insightsecure.ai\",\"publisher\":{\"@id\":\"https://docs.insightsecure.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.insightsecure.ai/api-reference/authentication#webpage\",\"url\":\"https://docs.insightsecure.ai/api-reference/authentication\",\"name\":\"Authentication\",\"description\":\"Public and private keys, HMAC signing, and how to authenticate every request\",\"dateModified\":\"2026-08-03T09:48:41.191Z\",\"isPartOf\":{\"@id\":\"https://docs.insightsecure.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.insightsecure.ai/api-reference/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.insightsecure.ai/api-reference/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Documentation\",\"item\":\"https://docs.insightsecure.ai/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.insightsecure.ai/api-reference/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.insightsecure.ai/api-reference/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Public and private keys, HMAC signing, and how to authenticate every request\",\"url\":\"https://docs.insightsecure.ai/api-reference/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.insightsecure.ai/api-reference/authentication#webpage\"},\"dateModified\":\"2026-08-03T09:48:41.191Z\",\"publisher\":{\"@id\":\"https://docs.insightsecure.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.insightsecure.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"InsightAI Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"InsightAI Documentation","nav":{"global":{"anchors":[{"anchor":"Company","href":"https://insightai.in","icon":"building"},{"anchor":"InsightSecure","href":"https://insightsecure.ai","icon":"shield-halved"},{"anchor":"DI Dashboard","href":"https://deviceintel.insightsecure.ai/di/dashboard","icon":"gauge"},{"anchor":"Blog","href":"https://www.linkedin.com/company/insightai-technologies/posts/?feedView=articles","icon":"newspaper"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"API Reference — Introduction","description":"How InsightAI's APIs are organized","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Webhooks \u0026 Payload Reference","description":"The risk.alert webhook payload, field by field","href":"/api-reference/webhooks-and-payload"}]},{"group":"Device Intelligence APIs","pages":[{"title":"Ingest Telemetry","api":"POST https://ingest.insightsecure.ai/v1/rasp/ingest","href":"/api-reference/endpoint/di/ingest_telemetry"},{"title":"Fetch Alerts","api":"GET https://api.insightsecure.ai/v1/di/alerts","href":"/api-reference/endpoint/di/fetch_alerts"},{"title":"Fetch Device History","api":"GET https://api.insightsecure.ai/v1/di/devices/{device_id}","href":"/api-reference/endpoint/di/fetch_device"}]}]}]},"basePath":"","title":"Authentication - InsightAI Documentation","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":[],"chunks":[]}