Token Gating refers to restricting access to certain websites, services or applications based on the ownership of a token. In this case, Token Gating specifically refers to ownership of NFTs and the subsequent restriction or access of websites relevant to these NFTs.
When a user attempts to access a token gated page and connects it to a crypto wallet to do so, he will be redirected to the appropriate page based on the NFTs owned by the user.
If the user has those exclusive NFTs, he can access the page; otherwise, he is redirected to the error url entered by the admin.
Step:1 Configure the NFTs
Open the Contract Address Config tab and click on Add Token Details button.
Enter valid details for NFTs you want to configure (Refer the below table).
Contract Address Name
Add a relevant name
Enter the Contract Address of NFT Collection
Enter the minimum number of tokens the end user should hold.
Token Ids (Optional)
Enter specific Token Ids that user should have
Choose appropriate blockchain for the NFT to be configured.
When NFT Configurations are saved, they are added to the list on the Contract Address Config tab.
Step:2 Add NFT Content Restriction
Go to NFT Content Restriction tab and click on Add Content Gating Details button.
Enter Appropriate details in the form (Refer the below table).
Page URL Regex
Choose the page to which you want to add Token Gating.
Contract Address Name
Choose the appropriate Contract Address from the dropdown menu configs
Add Error URL for users who do not have the necessary exclusive NFTs to access the content.
Below is an Example of Configuring an NFT Token Gating on a wordpress page :
In the Add Content Gating Details Modal, choose the page you wish to add token gating to. Below I have selected TestPage1.
Select the Contract address that users will need to access the restricted . You can also choose more than one Contract Address.
Choose the error page to which the user should be redirected if they don't have those NFTs, here is the error page that I selected. In the Add Content Gating Modal, enter the URL of the chosen error page.
You can include the NFT Collection page as an Error URL so that users are redirected to purchase NFT in order to access the gated content.
Click on Add to Save the Details.
New row gets added to the NFT Content Restriction tab.
Also, you can get Test Configurations for a particular wallet address in order to check if they have access to the pages gated.
Step:2 Test Configuration
Click on Test Configuration button and enter the wallet address for which you want to test.
Click on Submit button .
You can see the Test Configuration Result tor the entered wallet address .