> ## Documentation Index
> Fetch the complete documentation index at: https://docs.etrnl.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify Authenticity

<div>
  <script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js" />

  <lottie-player src="https://lottie.host/c404786e-2d84-4239-a092-5fa55366d5a7/DRPRrsgJH4.json" background="transparent" speed={1} style={{ width: 300, height: 300 }} direction={1} mode="normal" loop="" controls="" autoPlay="" />
</div>

<Note>You can use either the Public or Private API Key</Note>

This endpoint can be used to test if the NFC generated dynamic data is authentic or inauthentic.

## Error Messages

* **ctrBehind** - The URL has expired and is no longer valid.
* **uidMismatch** - The encrypted UID did not match the UID stored in our database for the tag ID. The encrypted data was probably tampered with.
* **cmacMismatch** - CMAC signature check did not succeed. The CMAC was probably tampered with.
* **doesNotExist** - The tag ID is invalid and does not exist in our database.
* **inactive** - The tag has been marked as inactive in our database. This is probably a result of a tag that hasn't been completely programmed.
* **unauthorized** - The tag does not belong to your organization.

<br />

## Headers

<ParamField header="API-Key" placeholder="Private or Public API Key" type="string" required>
  Your organization's public/private API key.
</ParamField>

## JSON Request Body

<ParamField body="tagId" type="number" placeholder="1" required>
  The ETRNL unique ID of the tag
</ParamField>

<ParamField body="enc" type="string" placeholder="C038A76FAB26F1FBBBDA23FC0904C10A" required>
  The encrypted message generated by the tag
</ParamField>

<ParamField body="cmac" type="string" placeholder="E064A56067FB63F8">
  The CMAC integrity data generated by the tag *(Only required if tamper detection is **not** enabled)*
</ParamField>

<ParamField body="tt" type="string" placeholder="CE9C772B37F6CACA3C0A35EE90158CF80E74268DDDA1E8D5EB57EC2E36D7D3B5">
  The encrypted tag tamper status generated by the tag. *(Only required if tamper detection is enabled)*
</ParamField>

<ParamField body="eCode" type="string" placeholder="B08CF3C4910833F226A260D397CAB992" required>
  A KDF input parameter used for key decyrption
</ParamField>

<ResponseExample>
  ```json Authenticated Successfully theme={null}
  {
  	success: true,
  	err: null,
  	exists: true,
  	authentic: true,
  	ctr: 12,
  	uid: "04C148EAC37180",
  	ttCurrStatus: null,
  	ttPermStatus: null,
  	lastAuthenticTimestamp: "2023-07-09T09:23:53.672Z",
  	lastAuthenticCtr: 11,
  	metadata: {
  		nftId: 'xxxxxxx'
  	}
  }
  ```
</ResponseExample>
