> For the complete documentation index, see [llms.txt](https://docs.legitimate.tech/technical-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.legitimate.tech/technical-docs/native-app-implementation.md).

# Native App Implementation

## Native App NFC Reading

If you already have a native app, you can also leverage native NFC reading capabilities within the app to read NFC tags programmed by Legitimate. To do so, please refer to the standard documentation to trigger the NFC reading capabilities of the mobile app operating system that you are developing for.&#x20;

For further clarity, your application must be able to read NFC tags programmed to emit data in NDEF format. This is a fairly standard capability, with support from all major mobile operating systems and frameworks. We've included links to some standard libraries and resources below:

* [iOS](https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_app)
* [Android](https://developer.android.com/develop/connectivity/nfc)
* [React Native](https://github.com/revtel/react-native-nfc-manager) (multiple libraries exist)

After successfully setting up NFC read support in your native application, you should be able to trigger an NFC reading session on your phone. Scanning a Legitimate NFC tag should yield data in the following format:

```url
https://verify.legitimate.tech/?uid=XXXXXXXXXXXXXXX&ctr=YYYYYY&cmac=ZZZZZZZZZZZZZZZZ
```

The URL parameters can then be used to call the tag related APIs.

Each time an NFC tag is scanned, a new set of verification parameters will be generated. Therefore, if you are intending to use the Tag URL Redirect features, it is extremely important to note that [**you must verify the parameters every time a scan occurs**](/technical-docs/api-resources/verify.md). This is meant to protect the connected products from counterfeit and ensure that each scan is unique.

### (Native App) High Level User Interface Overview

* User opens Native App and triggers an NFC read action
  * iOS applications will trigger a native OS-level user NFC prompt
* The NFC tag is read and NDEF data is returned to the mobile app [`https://verify.legitimate.tech/?uid=XXXXXXXXXXXXXX&ctr=YYYYYY&cmac=ZZZZZZZZZZZZ`](https://tap.legitimate.tech/?uid=XXXXXXXXXXXXXX\&ctr=YYYYYY\&cmac=ZZZZZZZZZZZZZ)
* The `uid`, `ctr`, and `cmac` is used to verify the tag's authenticity and get information about the content for the tag.&#x20;
* When integrating Legitimate into a native app, you must call our APIs to verify the digital signature payload that is present in the query parameters.
  * You can implement this verification yourself using our [API Resources](/technical-docs/api-resources.md) to create a more robust user-experience.

## APIs

Direct access to our APIs are available to our enterprise clients. Different plans are available depending on the number of tags supported, API usage limits, custom domains for endpoints, and CORS domain allowlists.

You can call a [set of APIs](/technical-docs/api-resources/verify.md) to obtain the digital ID and blockchain information associated with the tag. With the given information about the digital ID, you can then call our APIs to [transfer](/technical-docs/api-resources/claim.md) the digital ID to a given user wallet or [reset](/technical-docs/api-resources/recover.md) ownership when the item is sold or given away.

See our [API Access](/technical-docs/api-resources.md) page for more documentation about the APIs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.legitimate.tech/technical-docs/native-app-implementation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
