NFC Authentication in your own App
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.
Defining your URL
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.
Programming Tags
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.
Authenticating from your website/app
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.
Getting the data from the URL
For this example, we’ll be using javascript, but the concepts are the same across languages.
Sending the data to the API
Documentation for the API can be found here.