ETRNL was built with integration in mind.
We want you to build the best, and most engaging experiences for your users without having to worry about security or management of these tags.
Our developer friendly API allows you to do this, and get up and running quickly.
In order to program the tag for your website/app, we first need to know what the URL should be, and where the dynamic parameters should exist in the URL.
The easiest way to do this would be to create a secure page and enable the custom URL feature in the advanced settings.
From there, you can edit your base URL, enable tag tamper detection, and move the 4 required parameters in the query param or slug of your choice.
If you’re building an ios/android app, you will need to set up deep linking.
You would program tags the same way that you normally would.
Just select the page with the custom URL, put it in PROGRAM mode, and hold the tag to the reader until you see the SUCCESS message.
You can confirm that the tag was programmed to the correct URL by putting the program in READ mode and reading the URL from the tag.
Now that you have your URL configured and a tag programmed, you can start implementing authentication on your website.
There are 2 ways that you can do this.
You can either authenticate using client-side code (less secure), or you can authenticate from the backend (recommended).
The only difference is that when you want to authenticate on the client, you should use the public API key, and when you want to authenticate on the backend, you can use the private API key.
Never use the private API key in client side code, only the public key.
For this example, we’ll be using javascript, but the concepts are the same across languages.
const url = new URL( window.location );// Tag ID was defined as the 1st slug in this exampleconst tagId = url.pathname.split('/')[1];const eCode = url.searchParams.get('eCode');const enc = url.searchParams.get('enc');const cmac = url.searchParams.get('cmac');
const res = await fetch( 'https://third-party.etrnl.app/v1/tags/verify-authenticity', { method: 'POST', headers: { 'Content-Type': 'application/json', 'API-KEY': 'XXXXXXX' // Your API key goes here }, body: JSON.stringify({ tagId, eCode, enc, cmac }) });const { success, // boolean exists, // boolean authentic, // boolean ctr, // number uid, // string (only provided if using the private key) err // error code} = await res.json();
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"ETRNL VAULT","colors":{"primary":"#000000","light":"#FFFFFF","dark":"#0D001D"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/invisibleartllc/r_HaaiBT_PmfMExZ/logo/text-black.svg?fit=max\u0026auto=format\u0026n=r_HaaiBT_PmfMExZ\u0026q=85\u0026s=cbf9ca2fdcecb2c2d1e322a64acb40dc","dark":"https://mintcdn.com/invisibleartllc/r_HaaiBT_PmfMExZ/logo/text-white.svg?fit=max\u0026auto=format\u0026n=r_HaaiBT_PmfMExZ\u0026q=85\u0026s=0216e1a1e94cf8899c67cf3b39e5eb5c","href":"https://etrnl.app"},"api":{"mdx":{"server":"https://third-party.etrnl.app"}},"background":{"decoration":null,"color":{"light":null,"dark":"#000000"}},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://etrnl.app"}},"footer":{"socials":{"twitter":"https://twitter.com/etrnlvault","instagram":"https://instagram.com/etrnlvault","linkedin":"https://www.linkedin.com/company/mintsearch"}},"integrations":{"ga4":{"measurementId":"G-9CPJS4J11M"},"hotjar":{"hjid":"3727614","hjsv":"6"}},"navigation":{"global":{"anchors":[{"anchor":"Discord","href":"https://discord.gg/FvNtx5ga8h","icon":"discord"},{"anchor":"Blog","href":"https://blog.etrnl.app","icon":"newspaper"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"invisibleartllc","hasAudioNarration":false,"actualSubdomain":"invisibleartllc","customDomains":["docs.etrnl.app"],"gitSource":{"type":"github","owner":"tino-f","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae91d0285c0c2fd2e2485d7:success","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":17},{"language":"default","tag":"Documentation","count":9},{"language":"default","tag":"URL Groups","count":8},{"language":"default","tag":"Examples","count":5},{"language":"default","tag":"Metadata Queue Item","count":3},{"language":"default","tag":"Pages","count":3},{"language":"default","tag":"NFC","count":3},{"language":"default","tag":"API Documentation","count":2},{"language":"default","tag":"Tags","count":1},{"language":"default","tag":"Get Started","count":1}]},"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":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"example/nfc-authentication-in-your-own-app","slug":"/example/nfc-authentication-in-your-own-app","pageMetadata":{"title":"NFC Authentication in your own App","description":null,"href":"/example/nfc-authentication-in-your-own-app"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`ETRNL was built with integration in mind.\nWe want you to build the best, and most engaging experiences for your users without having to worry about security or management of these tags.\nOur developer friendly API allows you to do this, and get up and running quickly.`}),`\n`,_jsx(Heading,{level:`2`,id:`defining-your-url`,children:`Defining your URL`}),`\n`,_jsx(_components.p,{children:`In order to program the tag for your website/app, we first need to know what the URL should be, and where the dynamic parameters should exist in the URL.\nThe easiest way to do this would be to create a secure page and enable the custom URL feature in the advanced settings.\nFrom there, you can edit your base URL, enable tag tamper detection, and move the 4 required parameters in the query param or slug of your choice.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/invisibleartllc/r_HaaiBT_PmfMExZ/images/external-authentication/secure-page-custom-url.gif?s=eb081dcbdac6c7fd8f65efc5cd7c958a`,alt:`Secure Page Custom URL`,\"data-og-width\":`800`,width:`800`,\"data-og-height\":`405`,height:`405`,\"data-path\":`images/external-authentication/secure-page-custom-url.gif`,\"data-optimize\":`true`,\"data-opv\":`3`})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`If you’re building an ios/android app, you will need to set up deep linking.`})}),`\n`,_jsx(Heading,{level:`2`,id:`programming-tags`,children:`Programming Tags`}),`\n`,_jsxs(_components.p,{children:[`You would program tags the same way that you normally would.\nJust select the page with the custom URL, put it in `,_jsx(`b`,{children:`PROGRAM`}),` mode, and hold the tag to the reader until you see the `,_jsx(`b`,{children:`SUCCESS`}),` message.\nYou can confirm that the tag was programmed to the correct URL by putting the program in `,_jsx(`b`,{children:`READ`}),` mode and reading the URL from the tag.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authenticating-from-your-website/app`,children:`Authenticating from your website/app`}),`\n`,_jsxs(_components.p,{children:[`Now that you have your URL configured and a tag programmed, you can start implementing authentication on your website.\nThere are 2 ways that you can do this.\nYou can either authenticate using client-side code (less secure), or you can authenticate from the backend (recommended).\nThe only difference is that `,_jsx(`b`,{children:`when you want to authenticate on the client, you should use the public API key, and when you want to authenticate on the backend, you can use the private API key.`})]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never use the private API key in client side code, only the public key.`})}),`\n`,_jsx(Heading,{level:`3`,id:`getting-the-data-from-the-url`,children:`Getting the data from the URL`}),`\n`,_jsx(_components.p,{children:`For this example, we’ll be using javascript, but the concepts are the same across languages.`}),`\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:[_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:` url`}),_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:` URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`location`}),_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:`// Tag ID was defined as the 1st slug in this example`})}),`\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:` tagId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pathname`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`split`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` eCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`searchParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'eCode'`}),_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:` enc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`searchParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'enc'`}),_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:` cmac`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`searchParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cmac'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`sending-the-data-to-the-api`,children:`Sending the data to the API`}),`\n`,_jsxs(_components.p,{children:[`Documentation for the API can be found `,_jsx(_components.a,{href:`/api-reference/endpoints/tags/verify-authenticity`,children:`here.`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,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:`20`,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:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t'https://third-party.etrnl.app/v1/tags/verify-authenticity'`}),_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:`\t{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tmethod:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_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:`\t\theaders:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t\t\t'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t\t\t'API-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'XXXXXXX'`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Your API key goes here`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t\t},`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tbody:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`tagId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`eCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`enc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cmac`}),_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:`\t}`})}),`\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\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`\tsuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// boolean`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`\texists`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// boolean`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`\tauthentic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// boolean`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`\tctr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// number`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`\tuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// string (only provided if using the private key)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`\terr`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // error code`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\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":"NFC Authentication in your own App","description":null,"href":"/example/nfc-authentication-in-your-own-app"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Defining your URL","slug":"defining-your-url","depth":2,"children":[]},{"title":"Programming Tags","slug":"programming-tags","depth":2,"children":[]},{"title":"Authenticating from your website/app","slug":"authenticating-from-your-website/app","depth":2,"children":[{"title":"Getting the data from the URL","slug":"getting-the-data-from-the-url","depth":3,"children":[]},{"title":"Sending the data to the API","slug":"sending-the-data-to-the-api","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"invisibleartllc","siteName":"ETRNL VAULT","title":"NFC Authentication in your own App - ETRNL VAULT","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T23:43:34.726Z","originalFileLocation":"example/nfc-authentication-in-your-own-app.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=\"ETRNL VAULT\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/invisibleartllc/HAhif4eUAUX3bNvG/_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/invisibleartllc/HAhif4eUAUX3bNvG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/invisibleartllc/HAhif4eUAUX3bNvG/_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/invisibleartllc/HAhif4eUAUX3bNvG/_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/invisibleartllc/HAhif4eUAUX3bNvG/_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/invisibleartllc/HAhif4eUAUX3bNvG/_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/invisibleartllc/HAhif4eUAUX3bNvG/_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/invisibleartllc/HAhif4eUAUX3bNvG/_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/invisibleartllc/HAhif4eUAUX3bNvG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"NFC Authentication in your own App - ETRNL VAULT\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ETRNL VAULT\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://invisibleartllc.mintlify.site/_mintlify/api/og/v2?division=Examples\u0026amp;title=NFC+Authentication+in+your+own+App\u0026amp;theme=7a8602f08765c3431b668f89\u0026amp;signature=9c86779c9f5ff5fde9179d5408aa2fdb48aa0353a3a11269382b92773fa76927\">\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=\"NFC Authentication in your own App - ETRNL VAULT\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://invisibleartllc.mintlify.site/_mintlify/api/og/v2?division=Examples\u0026amp;title=NFC+Authentication+in+your+own+App\u0026amp;theme=7a8602f08765c3431b668f89\u0026amp;signature=9c86779c9f5ff5fde9179d5408aa2fdb48aa0353a3a11269382b92773fa76927\">\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/invisibleartllc/HAhif4eUAUX3bNvG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ETRNL VAULT\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/example/nfc-authentication-in-your-own-app.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.etrnl.app/#organization\",\"name\":\"ETRNL VAULT\",\"url\":\"https://docs.etrnl.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/invisibleartllc/r_HaaiBT_PmfMExZ/logo/text-black.svg?fit=max\u0026auto=format\u0026n=r_HaaiBT_PmfMExZ\u0026q=85\u0026s=cbf9ca2fdcecb2c2d1e322a64acb40dc\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.etrnl.app#website\",\"name\":\"ETRNL VAULT\",\"url\":\"https://docs.etrnl.app\",\"publisher\":{\"@id\":\"https://docs.etrnl.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app#webpage\",\"url\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app\",\"name\":\"NFC Authentication in your own App\",\"dateModified\":\"2026-01-06T23:43:34.726Z\",\"isPartOf\":{\"@id\":\"https://docs.etrnl.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Examples\",\"item\":\"https://docs.etrnl.app/example/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NFC Authentication in your own App\",\"item\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app#article\",\"headline\":\"NFC Authentication in your own App\",\"name\":\"NFC Authentication in your own App\",\"url\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app\",\"mainEntityOfPage\":{\"@id\":\"https://docs.etrnl.app/example/nfc-authentication-in-your-own-app#webpage\"},\"dateModified\":\"2026-01-06T23:43:34.726Z\",\"publisher\":{\"@id\":\"https://docs.etrnl.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.etrnl.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ETRNL VAULT\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"ETRNL VAULT","nav":{"global":{"anchors":[{"anchor":"Discord","href":"https://discord.gg/FvNtx5ga8h","icon":"discord"},{"anchor":"Blog","href":"https://blog.etrnl.app","icon":"newspaper"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/introduction"}]},{"group":"Examples","pages":[{"title":"Quickstart","href":"/example/quickstart"},{"title":"Advanced Page Customization","description":null,"href":"/example/advanced-page-customization"},{"title":"NFC Authentication in your own App","href":"/example/nfc-authentication-in-your-own-app"},{"title":"Create an external URL group","description":null,"href":"/example/external-url-group"},{"title":"Tag specific metadata","href":"/example/tag-specific-metadata"}]},{"group":"NFC","pages":[{"title":"What is NFC?","href":"/nfc-resources/nfc"},{"title":"What is an NFC Tag?","href":"/nfc-resources/nfc-tag"},{"title":"What is NDEF?","href":"/nfc-resources/ndef"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/keys"}]}]},"basePath":"","title":"NFC Authentication in your own App - ETRNL VAULT","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CXMGc493.js","DynamicMarkdown-D-2HDKEp.js","zoom-image-lightbox-CE4cYsJE.js","lightbox-handle-r17bVUz3.js"]}