Public API Keys are used in your widget to request public resources. These keys are designed to be used in client-side applications and have limited permissions.
In addition to using a Public API Key, you should configure your widget with a JWT and enable the “Require JWT to authenticate tenant requests” settings in the hotglue dashboard (Settings > Widget). When enabled, the Public API Key alone cannot be used to perform tenant-specific tasks --- a valid JWT must also be provided.
To generate your private signing key, head to the environment settings page and press Generate private key under the API Keys section:
Do not share this private signing key!For security purposes, hotglue does not store your private signing key. Keys are unique to every hotglue environment and can only be generated by an admin.
Store this private signing key securely in your backend environment variables.
Once you have a private signing key, you can generate a JWT from your backend to make secure requests to the hotglue API. In JavaScript, you can do this with:
When launching the widget, you can pass the JWT using the options parameter:
// Generate the JWT in your backend using the signing keyconst jwt = getJwt();// Launch the widgetHotGlue.open("tenant-id", { jwtToken: jwt});
For vanilla JavaScript, you can pass the JWT when initializing the Hotglue instance:
// Generate the JWT in your backend using the signing keyconst jwt = getJwt();const hotglue = new Hotglue({ tenantId: 'tenant-123', environmentId: '<ENV ID>', apiKey: '<PUBLIC API KEY>', jwtToken: '<TENANT SCOPED JWT>'});
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"hotglue Docs","colors":{"primary":"#FA5240","light":"#FA5240","dark":"#0D001D"},"logo":{"light":"https://mintcdn.com/hotglue/93ZiEPSb_fe30f8U/logo/light.svg?fit=max\u0026auto=format\u0026n=93ZiEPSb_fe30f8U\u0026q=85\u0026s=d6da8a743c519a664de97ec2f17bbe47","dark":"https://mintcdn.com/hotglue/93ZiEPSb_fe30f8U/logo/dark.svg?fit=max\u0026auto=format\u0026n=93ZiEPSb_fe30f8U\u0026q=85\u0026s=f60f3face71611a2985a6e4e4dbe28b0"},"favicon":"https://mintcdn.com/hotglue/5Ve6qyQIr-eWU9BP/favicon.png?fit=max\u0026auto=format\u0026n=5Ve6qyQIr-eWU9BP\u0026q=85\u0026s=d69376acad4420dc613eb4cfef299453","api":{"openapi":"openapi.json"},"appearance":{"default":"dark","strict":true},"background":{"color":{"dark":"#0f1117"}},"navbar":{"links":[{"href":"https://status.hotglue.xyz/","label":"Status"}],"primary":{"type":"button","label":"Dashboard","href":"https://hotglue.com/dashboard"}},"footer":{"socials":{"twitter":"https://twitter.com/hotgluexyz","github":"https://github.com/hotgluexyz","linkedin":"https://www.linkedin.com/company/hotglue"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hotglue","hasAudioNarration":false,"actualSubdomain":"hotglue","customDomains":["docs.hotglue.com"],"gitSource":{"type":"github","owner":"hotgluexyz","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae4e055bb109aca1d211516","collectionId":"e2dfdc9e-ad6e-4d24-b5be-a0040870ab86","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4e055bb109aca1d211516"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4e055bb109aca1d211516","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Documentation","count":310},{"language":"default","tag":"Connectors","count":243},{"language":"default","tag":"Community Connectors","count":177},{"language":"default","tag":"API Reference","count":83},{"language":"default","tag":"Embedded Widget","count":68},{"language":"default","tag":"Core Connectors","count":47},{"language":"default","tag":"hotglue API","count":32},{"language":"default","tag":"Key Concepts","count":25},{"language":"default","tag":"Transformation","count":25},{"language":"default","tag":"V1 flows (legacy)","count":21}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/authentication","slug":"/api-reference/authentication","pageMetadata":{"title":"Authentication","description":null,"href":"/api-reference/authentication"},"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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`api-keys`,children:`API Keys`}),`\n`,_jsxs(_components.p,{children:[`All API requests require authentication using an API key. API keys are passed via the `,_jsx(_components.code,{children:`x-api-key`}),` header in your requests.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_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:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.hotglue.com/...'`}),_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:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'x-api-key: your-api-key'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`There are three types of API keys in hotglue:`}),`\n`,_jsx(Heading,{level:`3`,id:`1-environment-secret-api-key`,children:`1. Environment Secret API Key`}),`\n`,_jsx(_components.p,{children:`The Environment Secret API Key has global permissions on your environment. Only admins have access to view and manage this key.`}),`\n`,_jsx(Heading,{level:`3`,id:`2-personal-api-key`,children:`2. Personal API Key`}),`\n`,_jsx(_components.p,{children:`Personal API Keys are tied to individual users and have permissions based on your role in a given environment. The available roles are:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Admin`}),` - Full permissions across all resources`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Developer`}),` - Read and Write access to most resources`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Viewer`}),` - Read-only access. Cannot read non-sensitive resources`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Personal API Keys are useful for programmatic access when you need permissions scoped to your user account.`}),`\n`,_jsx(Heading,{level:`3`,id:`3-public-api-key`,children:`3. Public API Key`}),`\n`,_jsx(_components.p,{children:`Public API Keys are used in your widget to request public resources. These keys are designed to be used in client-side applications and have limited permissions.`}),`\n`,_jsx(Heading,{level:`2`,id:`jwt-authentication-for-widgets`,children:`JWT Authentication for Widgets`}),`\n`,_jsxs(_components.p,{children:[`In addition to using a Public API Key, you should configure your widget with a JWT and enable the “Require JWT to authenticate tenant requests” settings in the hotglue dashboard (`,_jsx(_components.strong,{children:`Settings > Widget`}),`). When enabled, the Public API Key alone cannot be used to perform tenant-specific tasks --- a valid JWT must also be provided.`]}),`\n`,_jsx(Heading,{level:`3`,id:`generate-a-private-signing-key`,children:`Generate a Private Signing Key`}),`\n`,_jsxs(_components.p,{children:[`To generate your private signing key, head to the environment settings page and press `,_jsx(_components.strong,{children:`Generate private key`}),` under the API Keys section:`]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Do not share this private signing key!`})}),_jsx(_components.p,{children:`For security purposes, hotglue does not store your private signing key. Keys are unique to every hotglue environment and can only be generated by an admin.`})]}),`\n`,_jsx(_components.p,{children:`Store this private signing key securely in your backend environment variables.`}),`\n`,_jsx(Heading,{level:`3`,id:`creating-a-jwt`,children:`Creating a JWT`}),`\n`,_jsx(_components.p,{children:`Once you have a private signing key, you can generate a JWT from your backend to make secure requests to the hotglue API. In JavaScript, you can do this with:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,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:`16`,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:` jsonwebtoken`}),_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:`'jsonwebtoken'`}),_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:` currentTime`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`floor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_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:` tenantId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"unique-tenant-identifier\"`}),_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:` token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jsonwebtoken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sub:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tenantId`}),_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\":`#9CDCFE`},children:` iat:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentTime`}),_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\":`#9CDCFE`},children:` exp:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentTime`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 60`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 1 hour from now`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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\":`#9CDCFE`},children:` Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'HOTGLUE_SIGNING_KEY'`}),_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:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"utf8\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` algorithm:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"RS256\"`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`scoping-a-jwt`,children:`Scoping a JWT`}),`\n`,_jsxs(_components.p,{children:[`You can limit what a JWT is allowed to do by adding an optional `,_jsx(_components.code,{children:`scopes`}),` claim.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`No `,_jsx(_components.code,{children:`scopes`}),` claim:`]}),` the JWT keeps full tenant access, exactly as before.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`With a `,_jsx(_components.code,{children:`scopes`}),` claim:`]}),` it must be a list of strings, and it must include every scope the endpoint requires.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,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:` token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jsonwebtoken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sub:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tenantId`}),_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\":`#9CDCFE`},children:` iat:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentTime`}),_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\":`#9CDCFE`},children:` exp:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentTime`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 60`}),_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\":`#9CDCFE`},children:` scopes:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"linked_connector.read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jobs.read\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'HOTGLUE_SIGNING_KEY'`}),_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:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"utf8\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` algorithm:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"RS256\"`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Here are examples of common scopes that apply to tenant endpoints:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Grants`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`linked_connector.read`})}),_jsx(_components.td,{children:`List a tenant’s linked sources, targets and connectors`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`linked_connector.write`})}),_jsx(_components.td,{children:`Link and update a tenant’s sources, targets and connectors`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`linked_connector.delete`})}),_jsx(_components.td,{children:`Unlink a tenant’s sources, targets and connectors`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`linked_connector_catalog.read`})}),_jsxs(_components.td,{children:[`Include the catalog when listing linked connectors (`,_jsx(_components.code,{children:`?catalog=true`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`linked_connector_secrets.read`})}),_jsx(_components.td,{children:`Include credentials when returning a linked connector’s config. Without it, secrets are left out`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connector_metadata.read`})}),_jsxs(_components.td,{children:[`Include connector metadata when listing linked sources (`,_jsx(_components.code,{children:`?metadata=true`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connector_state.delete`})}),_jsx(_components.td,{children:`Reset a linked connector’s state`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`discover.read`})}),_jsx(_components.td,{children:`Poll a discover run`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`discover.write`})}),_jsx(_components.td,{children:`Start a discover run`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`jobs.read`})}),_jsx(_components.td,{children:`List jobs and read job status`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`schedule.read`})}),_jsx(_components.td,{children:`Read a tenant’s job schedule`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tenant_mapping.read`})}),_jsx(_components.td,{children:`Read a tenant’s mapping`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tenant_mapping.write`})}),_jsx(_components.td,{children:`Update a tenant’s mapping`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`using-the-jwt-in-widget-v3`,children:`Using the JWT in Widget V3`}),`\n`,_jsxs(_components.p,{children:[`When using Widget V3 with React, you can pass the JWT directly to the `,_jsx(_components.code,{children:`useHotglue`}),` hook:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`jsx`,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:`jsx`,children:_jsxs(_components.code,{language:`jsx`,numberOfLines:`21`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useHotglue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Widget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@hotglue/widget\"`}),_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\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` WidgetLauncher`}),_jsx(_components.span,{style:{color:`#953800`,\"--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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` tenantId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"MY-TENANT-ID\"`}),_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:` // Generate the JWT in your backend using the signing key`})}),`\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:` jwt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getJwt`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`openWidget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useHotglue`}),_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\":`#9CDCFE`},children:` tenantId`}),_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\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NEXT_PUBLIC_HOTGLUE_ENV_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\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NEXT_PUBLIC_HOTGLUE_PUBLIC_KEY`}),_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\":`#9CDCFE`},children:` jwtToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cTENANT SCOPED JWT>'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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\":`#C586C0`},children:` return`}),_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\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`Widget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` openWidget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`tenantId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Open Widget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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:`3`,id:`using-the-jwt-in-widget-v2`,children:`Using the JWT in Widget V2`}),`\n`,_jsxs(_components.p,{children:[`When launching the widget, you can pass the JWT using the `,_jsx(_components.a,{href:`https://docs.hotglue.com/docs/embed-hotglue-javascript-reference#options`,children:`options parameter`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate the JWT in your backend using the signing key`})}),`\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:` jwt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getJwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Launch the widget`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`HotGlue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"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\":`#9CDCFE`},children:` jwtToken:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jwt`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For vanilla JavaScript, you can pass the JWT when initializing the `,_jsx(_components.code,{children:`Hotglue`}),` instance:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,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:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate the JWT in your backend using the signing key`})}),`\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:` jwt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getJwt`}),_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:` hotglue`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Hotglue`}),_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\":`#9CDCFE`},children:` tenantId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'tenant-123'`}),_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\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cENV 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\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cPUBLIC API KEY>'`}),_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\":`#9CDCFE`},children:` jwtToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cTENANT SCOPED JWT>'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`using-the-jwt-in-api-requests`,children:`Using the JWT in API Requests`}),`\n`,_jsx(_components.p,{children:`Tenant-scoped API endpoints allow you to pass the JWT as a bearer token to access data on behalf of a tenant while using your Public API Key:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_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:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.hotglue.com/env_id/flow_id/tenant_id/linkedSources'`}),_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:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept: application/json'`}),_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:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'x-api-key: public_api_key'`}),_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:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003cTENANT SCOPED JWT>`})]}),`\n`]})})})]})}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":null,"href":"/api-reference/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"API Keys","slug":"api-keys","depth":2,"children":[{"title":"1. Environment Secret API Key","slug":"1-environment-secret-api-key","depth":3,"children":[]},{"title":"2. Personal API Key","slug":"2-personal-api-key","depth":3,"children":[]},{"title":"3. Public API Key","slug":"3-public-api-key","depth":3,"children":[]}]},{"title":"JWT Authentication for Widgets","slug":"jwt-authentication-for-widgets","depth":2,"children":[{"title":"Generate a Private Signing Key","slug":"generate-a-private-signing-key","depth":3,"children":[]},{"title":"Creating a JWT","slug":"creating-a-jwt","depth":3,"children":[]},{"title":"Scoping a JWT","slug":"scoping-a-jwt","depth":3,"children":[]},{"title":"Using the JWT in Widget V3","slug":"using-the-jwt-in-widget-v3","depth":3,"children":[]},{"title":"Using the JWT in Widget V2","slug":"using-the-jwt-in-widget-v2","depth":3,"children":[]},{"title":"Using the JWT in API Requests","slug":"using-the-jwt-in-api-requests","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"hotglue","siteName":"hotglue Docs","title":"Authentication - hotglue Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T22:03:39.474Z","originalFileLocation":"api-reference/authentication.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";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=\"dark\"}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=\"application-name\" content=\"hotglue Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hotglue/0VcZrfJjkH6v2iGG/_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/hotglue/0VcZrfJjkH6v2iGG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hotglue/0VcZrfJjkH6v2iGG/_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/hotglue/0VcZrfJjkH6v2iGG/_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/hotglue/0VcZrfJjkH6v2iGG/_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/hotglue/0VcZrfJjkH6v2iGG/_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/hotglue/0VcZrfJjkH6v2iGG/_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/hotglue/0VcZrfJjkH6v2iGG/_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/hotglue/0VcZrfJjkH6v2iGG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - hotglue Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"hotglue Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hotglue.com/api-reference/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hotglue.mintlify.app/_mintlify/api/og/v2?division=hotglue+API\u0026amp;title=Authentication\u0026amp;theme=6f74925a605d4b403769e9ea\u0026amp;signature=831d0db4faee14ae97d1f8ad9ee5768dc9cf9a4841d8a3eef596127645f3b780\">\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 - hotglue Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hotglue.mintlify.app/_mintlify/api/og/v2?division=hotglue+API\u0026amp;title=Authentication\u0026amp;theme=6f74925a605d4b403769e9ea\u0026amp;signature=831d0db4faee14ae97d1f8ad9ee5768dc9cf9a4841d8a3eef596127645f3b780\">\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/hotglue/0VcZrfJjkH6v2iGG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"hotglue Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FA5240\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hotglue.com/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.hotglue.com/#organization\",\"name\":\"hotglue Docs\",\"url\":\"https://docs.hotglue.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hotglue/93ZiEPSb_fe30f8U/logo/light.svg?fit=max\u0026auto=format\u0026n=93ZiEPSb_fe30f8U\u0026q=85\u0026s=d6da8a743c519a664de97ec2f17bbe47\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hotglue.com#website\",\"name\":\"hotglue Docs\",\"url\":\"https://docs.hotglue.com\",\"publisher\":{\"@id\":\"https://docs.hotglue.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hotglue.com/api-reference/authentication#webpage\",\"url\":\"https://docs.hotglue.com/api-reference/authentication\",\"name\":\"Authentication\",\"dateModified\":\"2026-10-29T22:03:39.474Z\",\"isPartOf\":{\"@id\":\"https://docs.hotglue.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hotglue.com/api-reference/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hotglue.com/api-reference/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"hotglue API\",\"item\":\"https://docs.hotglue.com/api-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.hotglue.com/api-reference/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.hotglue.com/api-reference/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"url\":\"https://docs.hotglue.com/api-reference/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hotglue.com/api-reference/authentication#webpage\"},\"dateModified\":\"2026-10-29T22:03:39.474Z\",\"publisher\":{\"@id\":\"https://docs.hotglue.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hotglue.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"hotglue Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"hotglue Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"hotglue API","pages":[{"title":"Overview","description":"Start making requests to the hotglue API!","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"},{"group":"Manage Tenants","pages":[{"openapi":"get /tenants/{env_id}","title":"Retrieve tenants","description":"Returns a list of tenants that exist in an environment","href":"/api-reference/manage-tenants/retrieve-tenants"},{"openapi":"put /tenants/{env_id}/schedule","title":"Toggle schedule","href":"/api-reference/manage-tenants/toggle-schedule"},{"openapi":"delete /tenant/{env_id}/{tenant}","title":"Delete a tenant","href":"/api-reference/manage-tenants/delete-a-tenant"},{"openapi":"put /tenant/{env_id}/{tenant}/metadata","title":"Set tenant metadata","href":"/api-reference/manage-tenants/set-tenant-metadata"},{"openapi":"get /tenant/{env_id}/{tenant}/mapping","title":"Get tenant mapping","href":"/api-reference/manage-tenants/get-tenant-mapping"},{"openapi":"put /tenant/{env_id}/{tenant}/mapping","title":"Set tenant mapping","href":"/api-reference/manage-tenants/set-tenant-mapping"},{"openapi":"post /{env_id}/magicLink","title":"Create a Magic Link","href":"/api-reference/manage-tenants/create-magic-link"},{"group":"Snapshots","pages":[{"openapi":"get /tenant/{env_id}/{tenant}/snapshots","title":"Get Snapshots","href":"/api-reference/manage-tenants/get-snapshot"},{"openapi":"delete /tenant/{env_id}/{tenant}/snapshots","title":"Delete Snapshot","href":"/api-reference/manage-tenants/delete-snapshot"}]},{"group":"Tenant Config","pages":[{"openapi":"get /tenant/{env_id}/{tenant}/config","title":"Get tenant config","href":"/api-reference/manage-tenants/get-tenant-config"},{"openapi":"put /tenant/{env_id}/{tenant}/config","title":"Set tenant config","href":"/api-reference/manage-tenants/set-tenant-config"},{"openapi":"patch /tenant/{env_id}/{tenant}/config","title":"Update tenant config","href":"/api-reference/manage-tenants/update-tenant-config"}]}]},{"group":"Flows","pages":[{"openapi":"post /{env_id}/flows/linked","title":"Create linked flows","href":"/api-reference/flows/create-linked-flows"},{"openapi":"get /{env_id}/flows/linked","title":"Retrieve linked flows","href":"/api-reference/flows/retrieve-linked-flows"},{"openapi":"get /{env_id}/flows/supported","title":"Retrieve supported flows","href":"/api-reference/flows/retrieve-supported-flows"}]},{"group":"Jobs","pages":[{"openapi":"get /{env_id}/{flow_id}/{tenant}/jobs/status","title":"Poll job status","href":"/api-reference/jobs/poll-job-status"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/jobs/latest","title":"Get latest job","href":"/api-reference/jobs/get-latest-job"},{"openapi":"post /{env_id}/{flow_id}/{tenant}/jobs/rollback","title":"Rollback job","href":"/api-reference/jobs/rollback-job"},{"openapi":"post /{env_id}/{flow_id}/{tenant}/jobs/kill","title":"Kill job","href":"/api-reference/jobs/kill-job"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/jobs","title":"Fetch jobs","href":"/api-reference/jobs/fetch-jobs"},{"openapi":"get /{env_id}/{flow}/{user_id}/jobs/queued","title":"Fetch queued jobs","href":"/api-reference/jobs/fetch-queued-jobs"},{"openapi":"get /{env_id}/jobs/queued","title":"Fetch environment queued jobs","href":"/api-reference/jobs/fetch-environment-queued-jobs"},{"openapi":"delete /{env_id}/{flow}/{user_id}/jobs/queued/{queued_job_id}","title":"Cancel queued job","href":"/api-reference/jobs/cancel-queued-job"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/jobs/download","title":"Trigger download","href":"/api-reference/jobs/trigger-download"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/jobs/zip","title":"Fetch job zip","href":"/api-reference/jobs/fetch-job-zip"},{"openapi":"post /{env_id}/{flow}/{tenant_id}/jobs/retrigger","title":"Retrigger a job","href":"/api-reference/jobs/retrigger-job"},{"openapi":"post /{env_id}/{flow}/{user_id}/connectors/api/uploads/url","title":"Stage data for write jobs","href":"/api-reference/jobs/generate-upload-url"}]},{"group":"Schedule jobs","pages":[{"openapi":"get /{env_id}/{flow_id}/{tenant}/jobs/schedule","title":"Retrieve jobs schedule","href":"/api-reference/schedule-jobs/retrieve-jobs-schedule"},{"openapi":"put /{env_id}/{flow_id}/{tenant}/jobs/schedule","title":"Create jobs schedule","href":"/api-reference/schedule-jobs/create-jobs-schedule"},{"openapi":"delete /{env_id}/{flow_id}/{tenant}/jobs/schedule","title":"Delete jobs schedule","href":"/api-reference/schedule-jobs/delete-jobs-schedule"}]}]},{"group":"V1 flows (legacy)","pages":[{"title":"Introduction","href":"/api-reference/v1/introduction"},{"openapi":"post /{env_id}/{flow_id}/{tenant}/jobs","title":"Run a V1 job","href":"/api-reference/v1/jobs/run-job"},{"group":"Source metadata","pages":[{"openapi":"get /{env_id}/{flow_id}/supportedSources","title":"Supported sources","href":"/api-reference/v1/source-metadata/supported-sources"},{"openapi":"get /{env_id}/availableSources","title":"Available sources","href":"/api-reference/v1/source-metadata/available-sources"}]},{"group":"Target metadata","pages":[{"openapi":"get /{env_id}/{flow_id}/supportedTargets","title":"Supported targets","href":"/api-reference/v1/target-metadata/supported-targets"},{"openapi":"get /{env_id}/availableTargets","title":"Available targets","href":"/api-reference/v1/target-metadata/available-targets"}]},{"group":"Linked sources","pages":[{"openapi":"post /{env_id}/{flow_id}/{tenant}/linkedSources","title":"Link a source","href":"/api-reference/v1/linked-sources/link-a-source"},{"openapi":"delete /{env_id}/{flow_id}/{tenant}/linkedSources","title":"Unlink a source","href":"/api-reference/v1/linked-sources/unlink-a-source"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/linkedSources","title":"Retrieve linked source","href":"/api-reference/v1/linked-sources/retrieve-linked-source"},{"openapi":"patch /{env_id}/{flow_id}/{tenant}/linkedSources","title":"Update linked sources","href":"/api-reference/v1/linked-sources/update-linked-sources"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/linkedSources/discover","title":"Run Discover","href":"/api-reference/v1/linked-sources/run-discover"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/linkedSources/discover/poll","title":"Poll Discover","href":"/api-reference/v1/linked-sources/poll-discover"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/linkedConnectors/discover/kill","title":null,"href":"/api-reference/v1/linked-sources/kill-discover"}]},{"group":"Linked sources state","pages":[{"openapi":"get /{env_id}/{flow_id}/{tenant}/linkedSources/state","title":"Retrieve source state","href":"/api-reference/v1/linked-sources-state/retrieve-source-state"},{"openapi":"put /{env_id}/{flow_id}/{tenant}/linkedSources/state","title":"Set source state","href":"/api-reference/v1/linked-sources-state/set-source-state"},{"openapi":"delete /{env_id}/{flow_id}/{tenant}/linkedSources/state","title":"Delete source state","href":"/api-reference/v1/linked-sources-state/delete-source-state"}]},{"group":"Linked targets","pages":[{"openapi":"post /{env_id}/{flow_id}/{tenant}/linkedTargets","title":"Link a target","href":"/api-reference/v1/linked-targets/link-a-target"},{"openapi":"delete /{env_id}/{flow_id}/{tenant}/linkedTargets","title":"Unlink a target","href":"/api-reference/v1/linked-targets/unlink-a-target"},{"openapi":"patch /{env_id}/{flow_id}/{tenant}/linkedTargets","title":"Update a linked target","href":"/api-reference/v1/linked-targets/update-linked-target"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/linkedTargets","title":"Retrieve linked target","href":"/api-reference/v1/linked-targets/retrieve-linked-target"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/linkedTargets/discover","title":"Run Discover","href":"/api-reference/v1/linked-targets/run-discover"}]}]},{"group":"V2 Flows","pages":[{"title":"Introduction","href":"/api-reference/v2/introduction"},{"openapi":"post /v2/{env_id}/{flow_id}/{tenant}/jobs","title":"Run a V2 Job","href":"/api-reference/v2/jobs/create"},{"group":"Supported and available connectors","pages":[{"openapi":"get /v2/{env_id}/{flow_id}/supportedConnectors","title":"Retrieve supported connectors","href":"/api-reference/v2/connector-metadata/retrieve-supported-connectors"},{"openapi":"get /v2/{env_id}/availableConnectors","title":"Retrieve available connectors","href":"/api-reference/v2/connector-metadata/retrieve-available-connectors"}]},{"group":"Linked connectors","pages":[{"openapi":"get /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors","title":"Retrieve linked connector","href":"/api-reference/v2/linked-connectors/get"},{"openapi":"post /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors","title":"Link a connector","href":"/api-reference/v2/linked-connectors/create"},{"openapi":"patch /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors","title":"Update linked connectors","href":"/api-reference/v2/linked-connectors/update"},{"openapi":"delete /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors","title":"Unlink connector","href":"/api-reference/v2/linked-connectors/delete"},{"openapi":"get /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/discover","title":"Run Discover","href":"/api-reference/v2/linked-connectors/trigger-discover"},{"openapi":"get /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/discover/poll","title":"Poll Discover","href":"/api-reference/v2/linked-connectors/poll-discover-status"}]},{"group":"Linked connectors state","pages":[{"openapi":"get /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/state","title":"Retrieve connector state","href":"/api-reference/v2/linked-connectors-state/retrieve-connector-state"},{"openapi":"put /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/state","title":"Set connector state","href":"/api-reference/v2/linked-connectors-state/set-connector-state"},{"openapi":"delete /v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/state","title":"Delete connector state","href":"/api-reference/v2/linked-connectors-state/delete-connector-state"}]},{"group":"Linked sources","pages":[{"openapi":"get /v2/{env_id}/{flow_id}/{tenant}/linkedSources","title":"Get linked sources","href":"/api-reference/v2/linked-sources/get"},{"openapi":"patch /v2/{env_id}/{flow_id}/{tenant}/linkedSources","title":"Update linked source","href":"/api-reference/v2/linked-sources/update"},{"openapi":"delete /v2/{env_id}/{flow_id}/{tenant}/linkedSources","title":"Unlink a source","href":"/api-reference/v2/linked-sources/delete"}]},{"group":"Linked targets","pages":[{"openapi":"get /v2/{env_id}/{flow_id}/{tenant}/linkedTargets","title":"Get linked targets","href":"/api-reference/v2/linked-targets/get"},{"openapi":"patch /v2/{env_id}/{flow_id}/{tenant}/linkedTargets","title":"Update linked target","href":"/api-reference/v2/linked-targets/update"},{"openapi":"delete /v2/{env_id}/{flow_id}/{tenant}/linkedTargets","title":"Unlink a target","href":"/api-reference/v2/linked-targets/delete"}]}]},{"group":"Connectors","pages":[{"group":"Access Tokens","pages":[{"openapi":"get /{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/accesstoken","title":"Retrieve access token","href":"/api-reference/access-tokens/retrieve-access-token"}]},{"group":"Custom stream filters","pages":[{"openapi":"get /{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/selectedFilters","title":"Retrieve Connector Selected Filters","href":"/api-reference/stream-filters/get-selected-filters"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/availableFilters","title":"Retrieve Connector Available Filters","href":"/api-reference/stream-filters/get-available-filters"},{"openapi":"delete /{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/selectedFilters","title":"Delete Connector Selected Filters","href":"/api-reference/stream-filters/delete-selected-filters"},{"openapi":"put /{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/selectedFilters","title":"Save Connector Selected Filters","href":"/api-reference/stream-filters/put-selected-filters"}]},{"group":"Real-time write","pages":[{"openapi":"post /{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/{stream}","title":"Write to a connector","href":"/api-reference/real-time/write"},{"openapi":"get /{env_id}/{flow_id}/{tenant}/connectors/status","title":"Poll write request","href":"/api-reference/real-time/status"}]},{"group":"Connector metadata","pages":[{"openapi":"get /{env_id}/{flow}/{user_id}/connectors/{connector_id}/metadata","title":"Retrieve connector metadata","href":"/api-reference/v2/connector-metadata/retrieve-connector-metadata"},{"openapi":"post /{env_id}/{flow}/{user_id}/connectors/{connector_id}/metadata/refresh","title":"Refresh connector metadata","href":"/api-reference/v2/connector-metadata/refresh-connector-metadata"},{"openapi":"get /{env_id}/{flow}/{user_id}/connectors/{connector_id}/metadata/poll","title":"Poll connector metadata refresh","href":"/api-reference/v2/connector-metadata/poll-connector-metadata"}]}]},{"group":"MCP","pages":[{"openapi":"get /{env_id}/{flow_id}/{tenant}/mcpToken","title":"Generate MCP token","href":"/api-reference/mcp/generate-mcp-token"}]}]},{"tab":"Embedded Widget","dropdowns":[{"dropdown":"Widget V3 (Beta)","icon":"3","groups":[{"group":"Embedded Widget","pages":[{"title":"Overview","icon":"eye","href":"/widget-v3/overview"},{"title":"Vanilla JS Setup","icon":"js","href":"/widget-v3/javascript"},{"title":"React Setup","icon":"react","href":"/widget-v3/react"},{"group":"Reference","icon":"book","pages":[{"title":"openWidget","href":"/widget-v3/reference/openWidget"},{"title":"link","href":"/widget-v3/reference/link"},{"title":"runJob","href":"/widget-v3/reference/runJob"},{"title":"getJobStatus","href":"/widget-v3/reference/getJobStatus"},{"title":"getSupportedConnectors","href":"/widget-v3/reference/getSupportedConnectors"},{"title":"setListeners","href":"/widget-v3/reference/setListeners"},{"title":"setLocalization","href":"/widget-v3/reference/setLocalization"},{"title":"helperText","href":"/widget-v3/reference/helperText"},{"title":"setCredentialsValidator","href":"/widget-v3/reference/setCredentialsValidator"},{"title":"Skip credential reuse flow","href":"/widget-v3/reference/skipCredentialsReuseFlows"},{"title":"hideBackButtons","href":"/widget-v3/reference/hideBackButtons"},{"title":"Connections","href":"/widget-v3/reference/connections"},{"title":"Field map editor","href":"/widget-v3/reference/fieldMapEditor"},{"title":"enableCustomMapping","href":"/widget-v3/reference/customMapping"},{"title":"Sync Schedules","href":"/widget-v3/reference/sync-schedule"}]}]}]},{"dropdown":"Widget V2 (Stable)","icon":"2","groups":[{"group":"Embedded Widget","pages":[{"title":"Overview","icon":"eye","href":"/connection-methods/embedded-widget/overview"},{"title":"Javascript Reference","icon":"js","href":"/connection-methods/embedded-widget/javascript"},{"group":"React Reference","icon":"atom","pages":[{"title":"Overview","href":"/connection-methods/embedded-widget/react/overview"},{"title":"Use the widget","href":"/connection-methods/embedded-widget/react/use-the-widget"},{"title":"HotglueConfig","href":"/connection-methods/embedded-widget/react/hotglue-config"},{"title":"Inline component","href":"/connection-methods/embedded-widget/react/inline-component"}]},{"group":"Options","icon":"sliders","pages":[{"title":"Allow multiple sources","href":"/connection-methods/embedded-widget/options/allow-multiple-sources"},{"title":"Custom Credential Validation","href":"/connection-methods/embedded-widget/options/custom-credential-validation"},{"title":"Create metadata","href":"/connection-methods/embedded-widget/options/create-metadata"},{"title":"Custom field mapping","href":"/connection-methods/embedded-widget/options/custom-field-mapping"},{"title":"Filter","href":"/connection-methods/embedded-widget/options/filter"},{"title":"Hide back buttons","href":"/connection-methods/embedded-widget/options/hide-back-buttons"},{"title":"Listeners","href":"/connection-methods/embedded-widget/options/listener"},{"title":"Localization","href":"/connection-methods/embedded-widget/options/override-default-text"},{"title":"Skip to flow","href":"/connection-methods/embedded-widget/options/skip-to-flow"}]},{"title":"Changelog","icon":"clock-rotate-left","href":"/connection-methods/embedded-widget/changelog"}]}]}]},{"tab":"Unified Schemas","href":"https://hotglue.com/docs/unified"}]},"basePath":"","title":"Authentication - hotglue Docs","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":[],"chunks":[]}