Link Access Burning

For the use-case where a user that owns a token should only be able to perform an action once, we provide a method to check if the user has burned their access to a token protected link.

This feature is useful if you want to create a token protected page what allows the user to get a one-time coupon or one-time access to buy/redeem an item for their token.

Note that once the user is put into the locked status, the user can still access their MintGate link. It's up to your frontend or backend to check the current lock status (see API below) and display the appropriate content for the user's session. This means your page should have two distinct states: one to allow the user to perform their exclusive action and another state to tell the user that they already used their exclusive action.


Get the current lock status of the user

API doc: GET request:​/v2​/links​/access​/check?mgsesssion=XYZ

On your frontend or backend, you can check the current status of the user by using this endpoint. This API requries one parameter mgsesssion which is passed as a query string to the page that the user lands on. The pointpont will return a json { locked: true | false } if the user has access.

The mgsesssion query parameter is added to any link that the user accesses through a MintGate link. For example, if you token protect, when the user accesses the MintGate link, they will access the page with attached. The mgsesssion stores the session information to allow your website to check or set the link lock status.

Burn user access

API doc: POST request:

This pointpoint will either lock or unlock the user's burn status. The method takes the mgsession query parameter that's passed to the page when the user visits. It also requires your developer JWT (see Steps) to give you permission to modify the user's status. Finally the lock parameter designates if the user has used this page before or now.

If the link has already been burned, the API will return a 500 error. This is by design as you should only perform the desired action to the user if this call completes successfully (the user's access is burned and it wasn't already burned).