To initiate the User Identity Verification process, you need to first enable this feature within your chatbot settings. This can be done through the chatbot settings in “User Identity Verification” section.Once the User Identity Verification is enabled your chatbot becomes equipped to automatically check for user tokens. This means each time a user attempts to interact with the chatbot, their identity token will be reviewed for authenticity.
It is essential to set up an API endpoint that will handle the verification of user tokens. This endpoint must be configured to accept POST requests.
Specify the API Endpoint: In your chatbot settings, provide the URL of the API endpoint. This is the server address where the token verification requests will be sent.
Configure for POST Requests: Ensure that your API endpoint is configured to handle POST requests. This is crucial as the DONNAJAMES Easy will send token data via POST requests for verification.
Here’s what happens each time a chat is initiated:
Token Submission: Whenever a chat is rendered, DONNAJAMES Easy automatically sends a verification request to the provided API endpoint. This request includes the user’s token.
Processing the Request: Your API endpoint should process this request, verifying the token’s validity.
Outcome Handling:
Successful Verification: If the token is verified successfully, the chatbot will allow the authenticated user to proceed with the chat.
Failed Verification: In case the API returns an error (indicating a failed verification), the authentication will be deemed unsuccessful. Consequently, the user will be redirected to an error screen.
To enhance the functionality of the User Identity Verification process and maintain records of user interactions, you have the option to save the data from successful verification responses.
Every time a user is successfully authenticated, the response from the verification process (typically including user identification details) is stored.This data is not stored in isolation but is linked with the specific chat conversations.
Only Valid JSON Data Accepted - Please ensure that all data provided for
storage is in valid JSON format. Non-JSON or invalid JSON data will be
automatically ignored and not stored in the conversation history.
Within the script of your webpage where the chatbot is integrated, locate the GPTTConfig object.
Here, you will need to update the token property with custom token. Here’s an example script:
You can also directly update the GPTTConfig object with your token using a JavaScript call.
This method is particularly useful if you need to dynamically update the token based on user interactions or other triggers within your application. Here’s how you can do it:
window.GPTTConfig.token = "Custom token";
When a change in the token property is detected, our system initiates an attempt to authenticate the user based on the new token value.
This ensures that the user’s identity is verified each time they interact with the chatbot.
You can pass the user token directly within an iframe by including it in the URL property.
Append the token parameter to the URL in the src attribute, replacing custom_token with the actual token value. Here’s an example:
If there is a need to change the token, simply update the src attribute of the iframe with the new token value.Upon updating the token in the URL, the iframe will reload, ensuring that the new token is used for authentication.Congratulations! You have now successfully completed the setup of the User Identity Verification feature for your DONNAJAMES Easy Chatbot.
By following the steps outlined in this guide, you have enabled a robust and secure method for authenticating users, ensuring a safe and reliable user experience.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"GPT-trainer API","colors":{"primary":"#2E3F51","light":"#516F90","dark":"#0D001D"},"favicon":"/logo/favicon.png","logo":{"light":"https://mintlify.s3-us-west-1.amazonaws.com/donnajameseasy/logo/light.svg","dark":"https://mintlify.s3-us-west-1.amazonaws.com/donnajameseasy/logo/dark.svg"},"api":{"openapi":"https://app.gpt-trainer.com/api/apidoc/openapi.json","mdx":{"server":"https://app.gpt-trainer.com/api","auth":{"method":"bearer","name":null}}},"background":{"decoration":null,"color":{"light":null,"dark":"#111827"}},"navbar":{"links":[{"label":"Support","href":"mailto:hello@gpt-trainer.com"}],"primary":null},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"donnajameseasy","hasAudioNarration":false,"actualSubdomain":"donnajameseasy","customDomains":["docs.donnajames.app"],"gitSource":{"type":"github","owner":"donnajames","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e667bd0a90f91cb449cb","collectionId":"f9fab44b-edd5-43bd-99cc-be98de3699ad","schemaVersion":"v2"},"entitlements":{},"buildId":"6ae92303416fcb78afb057e0:success","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"API References","count":37},{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Data Sources","count":9},{"language":"default","tag":"Chatbots","count":6},{"language":"default","tag":"Agents","count":5},{"language":"default","tag":"Session Messages","count":5},{"language":"default","tag":"API Usage Guides","count":4},{"language":"default","tag":"Chatbot Sessions","count":4},{"language":"default","tag":"Data Source Tags","count":4}]},"assistantConfig":{},"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":"vite-origin","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":"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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"user-identity","slug":"/user-identity","pageMetadata":{"title":"User Identity Verification","description":null,"href":"/user-identity"},"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={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This guide will walk you through implementing a robust authentication system within your chatbot.`}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-enable-user-identity`,children:`Step 1: Enable User Identity`}),`\n`,_jsx(_components.p,{children:`To initiate the User Identity Verification process, you need to first enable this feature within your chatbot settings. This can be done through the chatbot settings in “User Identity Verification” section.`}),`\n`,_jsx(_components.p,{children:`Once the User Identity Verification is enabled your chatbot becomes equipped to automatically check for user tokens. This means each time a user attempts to interact with the chatbot, their identity token will be reviewed for authenticity.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/images/user-identity-1.png`})}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-api-endpoint`,children:`Step 2: API Endpoint`}),`\n`,_jsx(Heading,{level:`3`,id:`setting-up-the-api-endpoint`,children:`Setting Up the API Endpoint`}),`\n`,_jsx(_components.p,{children:`It is essential to set up an API endpoint that will handle the verification of user tokens. This endpoint must be configured to accept POST requests.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Specify the API Endpoint:`}),` In your chatbot settings, provide the URL of the API endpoint. This is the server address where the token verification requests will be sent.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Configure for POST Requests:`}),` Ensure that your API endpoint is configured to handle POST requests. This is crucial as the DONNAJAMES Easy will send token data via POST requests for verification.`]}),`\n`]}),`\n`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/images/user-identity-2.png`})}),`\n`,_jsx(Heading,{level:`3`,id:`verification-process-flow`,children:`Verification Process Flow`}),`\n`,_jsx(_components.p,{children:`Here’s what happens each time a chat is initiated:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Token Submission:`}),` Whenever a chat is rendered, DONNAJAMES Easy automatically sends a verification request to the provided API endpoint. This request includes the user’s token.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Processing the Request:`}),` Your API endpoint should process this request, verifying the token’s validity.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Outcome Handling:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Successful Verification:`}),` If the token is verified successfully, the chatbot will allow the authenticated user to proceed with the chat.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Failed Verification:`}),` In case the API returns an error (indicating a failed verification), the authentication will be deemed unsuccessful. Consequently, the user will be redirected to an error screen.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-save-user’s-data`,children:`Step 3: Save User’s Data`}),`\n`,_jsx(_components.p,{children:`To enhance the functionality of the User Identity Verification process and maintain records of user interactions, you have the option to save the data from successful verification responses.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/images/user-identity-3.png`})}),`\n`,_jsx(_components.p,{children:`Every time a user is successfully authenticated, the response from the verification process (typically including user identification details) is stored.`}),`\n`,_jsx(_components.p,{children:`This data is not stored in isolation but is linked with the specific chat conversations.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Only Valid JSON Data Accepted`}),` - Please ensure that all data provided for\nstorage is in valid JSON format. Non-JSON or invalid JSON data will be\nautomatically ignored and not stored in the conversation history.`]})}),`\n`,_jsx(_components.p,{children:`Example of valid JSON:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`12`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"userId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"12345\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"userName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"JohnDoe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"johndoe@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"verified\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"roles\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"admin\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"profile\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"firstName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lastName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"age\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`})]}),`\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:`2`,id:`step-4-inserting-your-token-into-donnajames-easy-chatbot`,children:`Step 4: Inserting Your Token into DONNAJAMES Easy Chatbot`}),`\n`,_jsx(Heading,{level:`3`,id:`chat-widget`,children:`Chat Widget`}),`\n`,_jsxs(_components.p,{children:[`Within the script of your webpage where the chatbot is integrated, locate the `,_jsx(_components.strong,{children:`GPTTConfig`}),` object.\nHere, you will need to update the `,_jsx(_components.strong,{children:`token`}),` property with custom token. Here’s an example script:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`7`,language:`html`,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:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`7`,children:[_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:`script`}),_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\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GPTTConfig`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuid:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"15b1f07cd591476c94c210779a6c3c19\"`}),_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:` token:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Custom token\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--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\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_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:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://donnajames.app/widget-asset.min.js\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` defer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can also directly update the `,_jsx(_components.strong,{children:`GPTTConfig`}),` object with your token using a `,_jsx(_components.strong,{children:`JavaScript`}),` call.\nThis method is particularly useful if you need to dynamically update the token based on user interactions or other triggers within your application. Here’s how you can do it:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GPTTConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Custom token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When a change in the token property is detected, our system initiates an attempt to authenticate the user based on the new token value.\nThis ensures that the user’s identity is verified each time they interact with the chatbot.`}),`\n`,_jsx(Heading,{level:`3`,id:`iframe`,children:`Iframe`}),`\n`,_jsxs(_components.p,{children:[`You can pass the user token directly within an iframe by including it in the URL property.\nAppend the `,_jsx(_components.strong,{children:`token`}),` parameter to the `,_jsx(_components.strong,{children:`URL`}),` in the src attribute, replacing `,_jsx(_components.strong,{children:`custom_token`}),` with the actual token value. Here’s an example:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`html`,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:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`6`,children:[_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:`iframe`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://donnajames.app/widget/162223v?token=`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`custom_token>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` width`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100%\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` height`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"500px\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` frameborder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`})]}),`\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:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`If there is a need to change the token, simply update the src attribute of the iframe with the new token value.`}),`\n`,_jsx(_components.p,{children:`Upon updating the token in the URL, the iframe will reload, ensuring that the new token is used for authentication.`}),`\n`,_jsx(_components.p,{children:`Congratulations! You have now successfully completed the setup of the User Identity Verification feature for your DONNAJAMES Easy Chatbot.\nBy following the steps outlined in this guide, you have enabled a robust and secure method for authenticating users, ensuring a safe and reliable user experience.`})]})}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":"User Identity Verification","description":null,"href":"/user-identity"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Step 1: Enable User Identity","slug":"step-1-enable-user-identity","depth":2,"children":[]},{"title":"Step 2: API Endpoint","slug":"step-2-api-endpoint","depth":2,"children":[{"title":"Setting Up the API Endpoint","slug":"setting-up-the-api-endpoint","depth":3,"children":[]},{"title":"Verification Process Flow","slug":"verification-process-flow","depth":3,"children":[]}]},{"title":"Step 3: Save User’s Data","slug":"step-3-save-user’s-data","depth":2,"children":[]},{"title":"Step 4: Inserting Your Token into DONNAJAMES Easy Chatbot","slug":"step-4-inserting-your-token-into-donnajames-easy-chatbot","depth":2,"children":[{"title":"Chat Widget","slug":"chat-widget","depth":3,"children":[]},{"title":"Iframe","slug":"iframe","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"donnajameseasy","siteName":"GPT-trainer API","title":"User Identity Verification - GPT-trainer API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"user-identity.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=\"application-name\" content=\"GPT-trainer API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"User Identity Verification - GPT-trainer API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GPT-trainer API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.donnajames.app/user-identity\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://donnajameseasy.mintlify.app/_mintlify/api/og/v2?division=Authentication+Webhook\u0026amp;title=User+Identity+Verification\u0026amp;theme=9e3ddbe218d2b3a5efb5224e\u0026amp;signature=4e275d104241217106d825d754111018e26524b3d4aa12f0fc5ba1202bcb98ea\">\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=\"User Identity Verification - GPT-trainer API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://donnajameseasy.mintlify.app/_mintlify/api/og/v2?division=Authentication+Webhook\u0026amp;title=User+Identity+Verification\u0026amp;theme=9e3ddbe218d2b3a5efb5224e\u0026amp;signature=4e275d104241217106d825d754111018e26524b3d4aa12f0fc5ba1202bcb98ea\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/donnajameseasy/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GPT-trainer API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2E3F51\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.donnajames.app/user-identity\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/user-identity.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.donnajames.app/#organization\",\"name\":\"GPT-trainer API\",\"url\":\"https://docs.donnajames.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3-us-west-1.amazonaws.com/donnajameseasy/logo/light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.donnajames.app#website\",\"name\":\"GPT-trainer API\",\"url\":\"https://docs.donnajames.app\",\"publisher\":{\"@id\":\"https://docs.donnajames.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.donnajames.app/user-identity#webpage\",\"url\":\"https://docs.donnajames.app/user-identity\",\"name\":\"User Identity Verification\",\"isPartOf\":{\"@id\":\"https://docs.donnajames.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.donnajames.app/user-identity#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.donnajames.app/user-identity#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"GPT-trainer API\",\"item\":\"https://docs.donnajames.app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"User Identity Verification\",\"item\":\"https://docs.donnajames.app/user-identity\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.donnajames.app/user-identity#article\",\"headline\":\"User Identity Verification\",\"name\":\"User Identity Verification\",\"url\":\"https://docs.donnajames.app/user-identity\",\"mainEntityOfPage\":{\"@id\":\"https://docs.donnajames.app/user-identity#webpage\"},\"publisher\":{\"@id\":\"https://docs.donnajames.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.donnajames.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"GPT-trainer API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"GPT-trainer API","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"}]},{"group":"Guides","pages":[{"title":"Create Your First Chatbot","href":"/creating-first-chatbot"},{"title":"Lead Collection","href":"/lead-collection"},{"title":"Human support escalation","href":"/human-support-escalation"},{"title":"Inbox Notifications","href":"/inbox-notifications"},{"title":"Frustration detection","href":"/frustration-detection"},{"title":"Background Agents","href":"/background-agents"},{"title":"Multi agents chatbot","href":"/multi-agents-chatbot"},{"title":"Fine Tuning Agent Intents","href":"/fine-tuning-agent-intents"},{"title":"AI Supervisor Overrides","href":"/supervisor-overrides"},{"title":"Bring Your Own Key (BYOK) and Pricing","href":"/byok-pricing-guide"},{"title":"Working with Tables and CSV","href":"/working-with-tables"},{"title":"Best practices for preparing training data","href":"/best-practices"},{"title":"Why does my chatbot not answer correctly?","href":"/help"}]},{"group":"Function Calling","pages":[{"title":"RAG from an External Data Provider","description":null,"href":"/rag-from-external-data-provider"}]},{"group":"Authentication Webhook","pages":[{"title":"User Identity Verification","href":"/user-identity"}]}]},{"anchor":"API References","icon":"code","pages":[{"title":"API References","href":"/api-reference/api-key-setup"}]},{"anchor":"Tools","icon":"gear","pages":[{"title":"Tools","href":"/tools/tools-intro"}]},{"anchor":"Whitelabel","icon":"browser","pages":[{"title":"Whitelabel","href":"/whitelabel/whitelabel-intro"}]}]},"basePath":"","title":"User Identity Verification - GPT-trainer API","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-BdiBGm0H.js","DynamicMarkdown-CbqEDjbV.js","zoom-image-lightbox-CvtNkYOX.js","lightbox-handle-r17bVUz3.js"]}