{"id":4276,"date":"2024-04-24T21:04:49","date_gmt":"2024-04-24T21:04:49","guid":{"rendered":"https:\/\/unlock-protocol.com\/guides\/?p=4276"},"modified":"2024-04-24T23:46:10","modified_gmt":"2024-04-24T23:46:10","slug":"token-gating-with-unlock","status":"publish","type":"post","link":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/","title":{"rendered":"Token Gating with Unlock"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">&#8220;Token gating&#8221; is the ability to restrict access to content (e.g. articles, videos, sections of websites, etc.) to holders of a particular NFT. There are an ever-growing selection of onchain platforms that support token gating via Unlock Protocol as shown by the table below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most platforms that have native support for token gating implement it by way of seeing if a visitor holds a token from a particular smart contract. Typically, this means that the address of the smart contract is entered into an admin screen on the platform (this varies by platform), and then the platform does a technical check (using a smart contract function called <code>balanceOf<\/code>) to see if the site visitor holds a token from that smart contract. The <code>balanceOf<\/code> function typically returns the equivalent of a &#8220;true&#8221; result (if the holder does have a valid token\/membership) or &#8220;false&#8221; if they do not.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are a variety of implementations that vary a bit by platform.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, custom implementations are possible as well, as shown in the table below.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Platform<\/strong><\/td><td><strong>Details<\/strong><\/td><\/tr><tr><td><a href=\"https:\/\/discord.com\/\">Discord<\/a><\/td><td>Multiple custom bots including <a href=\"https:\/\/guild.xyz\">Guild<\/a> and <a href=\"https:\/\/collab.land\">Collab.land<\/a><\/td><\/tr><tr><td><a href=\"https:\/\/paragraph.xyz\/\">Paragraph<\/a><\/td><td>Native in platform (<a href=\"https:\/\/www.youtube.com\/watch?v=KaMVpOnZveE\">video walkthrough<\/a> and <a href=\"https:\/\/docs.paragraph.xyz\/docs\/token-gated-content\">docs<\/a>)<\/td><\/tr><tr><td><a href=\"https:\/\/guild.xyz\/\">Guild.xyz<\/a><\/td><td>Native in platform<\/td><\/tr><tr><td><a href=\"https:\/\/charmverse.io\/\">CharmVerse<\/a><\/td><td>Native in platform<\/td><\/tr><tr><td><a href=\"https:\/\/huddle01.com\/\">Huddle01<\/a><\/td><td>Native in platform<\/td><\/tr><tr><td><a href=\"https:\/\/telegram.org\/\">Telegram<\/a><\/td><td><a href=\"https:\/\/unlock-protocol.com\/guides\/how-to-token-gate-telegram-with-unlock-protocol-and-guild-xyz\/\">Guide<\/a><\/td><\/tr><tr><td><a href=\"https:\/\/huddle01.com\/\">Huddle01<\/a><\/td><td><a href=\"https:\/\/unlock-protocol.com\/guides\/huddle01-unlock-protocol\/\">Guide<\/a><\/td><\/tr><tr><td><a href=\"https:\/\/notion.so\/\">Notion<\/a><\/td><td><a href=\"https:\/\/unlock-protocol.com\/guides\/how-to-token-gate-notion\/\">Guide<\/a><\/td><\/tr><tr><td><a href=\"https:\/\/www.darkblock.io\/\">DarkBlock<\/a><\/td><td><a href=\"https:\/\/unlock-protocol.com\/guides\/how-to-create-subscription-content-with-unlock-protocol-and-darkblock\/\">Guide<\/a><\/td><\/tr><tr><td>React applications<\/td><td><a href=\"https:\/\/docs.unlock-protocol.com\/tutorials\/front-end\/react-example\">Tutorial<\/a><\/td><\/tr><tr><td>Scaffold-eth<\/td><td><a href=\"https:\/\/docs.unlock-protocol.com\/tutorials\/front-end\/scaffold-eth\">Tutorial<\/a><\/td><\/tr><tr><td>Express.js<\/td><td><a href=\"https:\/\/docs.unlock-protocol.com\/tutorials\/back-end\/backend-locking-with-express.js\">Tutorial<\/a><\/td><\/tr><tr><td>Web pages<\/td><td><a href=\"https:\/\/docs.unlock-protocol.com\/tutorials\/front-end\/locking-page\">Tutorial<\/a><\/td><\/tr><tr><td>Other applications<\/td><td>Any that support calls to&nbsp;<code>balanceOf<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you have any questions about token gating a particular application or platform with Unlock Protocol, please <a href=\"https:\/\/discord.unlock-protocol.com\">reach out in the Discord<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Token gating&#8221; is the ability to restrict access to content (e.g. articles, videos, sections of websites, etc.) to holders of a particular NFT. There are an ever-growing selection of onchain platforms that support token gating via Unlock Protocol as shown by the table below. Most platforms that have native support for token gating implement it [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":4277,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[21,42],"tags":[32],"class_list":["post-4276","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guide","category-plugins","tag-token-gated"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Token Gating with Unlock - Unlock Guides<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Token Gating with Unlock - Unlock Guides\" \/>\n<meta property=\"og:description\" content=\"&#8220;Token gating&#8221; is the ability to restrict access to content (e.g. articles, videos, sections of websites, etc.) to holders of a particular NFT. There are an ever-growing selection of onchain platforms that support token gating via Unlock Protocol as shown by the table below. Most platforms that have native support for token gating implement it [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/\" \/>\n<meta property=\"og:site_name\" content=\"Unlock Guides\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-24T21:04:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-24T23:46:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Christopher Carfi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Carfi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/\",\"url\":\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/\",\"name\":\"Token Gating with Unlock - Unlock Guides\",\"isPartOf\":{\"@id\":\"https:\/\/unlock-protocol.com\/guides\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png\",\"datePublished\":\"2024-04-24T21:04:49+00:00\",\"dateModified\":\"2024-04-24T23:46:10+00:00\",\"author\":{\"@id\":\"https:\/\/unlock-protocol.com\/guides\/#\/schema\/person\/680ce03e12589286dbf4f0465b355a12\"},\"breadcrumb\":{\"@id\":\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#primaryimage\",\"url\":\"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png\",\"contentUrl\":\"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https:\/\/unlock-protocol.com\/guides\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Token Gating with Unlock\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unlock-protocol.com\/guides\/#website\",\"url\":\"https:\/\/unlock-protocol.com\/guides\/\",\"name\":\"Unlock Guides\",\"description\":\"Connect with your 1000 true fans with membership NFT\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unlock-protocol.com\/guides\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/unlock-protocol.com\/guides\/#\/schema\/person\/680ce03e12589286dbf4f0465b355a12\",\"name\":\"Christopher Carfi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/unlock-protocol.com\/guides\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/58b2b2f69056d53f8fce3aaf9906496bdc7899c962dc12b68990f2327d5becd5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/58b2b2f69056d53f8fce3aaf9906496bdc7899c962dc12b68990f2327d5becd5?s=96&d=mm&r=g\",\"caption\":\"Christopher Carfi\"},\"sameAs\":[\"https:\/\/unlock-protocol.com\/\"],\"url\":\"https:\/\/unlock-protocol.com\/guides\/author\/chris\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Token Gating with Unlock - Unlock Guides","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/","og_locale":"en_US","og_type":"article","og_title":"Token Gating with Unlock - Unlock Guides","og_description":"&#8220;Token gating&#8221; is the ability to restrict access to content (e.g. articles, videos, sections of websites, etc.) to holders of a particular NFT. There are an ever-growing selection of onchain platforms that support token gating via Unlock Protocol as shown by the table below. Most platforms that have native support for token gating implement it [&hellip;]","og_url":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/","og_site_name":"Unlock Guides","article_published_time":"2024-04-24T21:04:49+00:00","article_modified_time":"2024-04-24T23:46:10+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png","type":"image\/png"}],"author":"Christopher Carfi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Christopher Carfi","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/","url":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/","name":"Token Gating with Unlock - Unlock Guides","isPartOf":{"@id":"https:\/\/unlock-protocol.com\/guides\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#primaryimage"},"image":{"@id":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#primaryimage"},"thumbnailUrl":"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png","datePublished":"2024-04-24T21:04:49+00:00","dateModified":"2024-04-24T23:46:10+00:00","author":{"@id":"https:\/\/unlock-protocol.com\/guides\/#\/schema\/person\/680ce03e12589286dbf4f0465b355a12"},"breadcrumb":{"@id":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#primaryimage","url":"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png","contentUrl":"https:\/\/unlock-protocol.com\/guides\/wp-content\/uploads\/2024\/04\/token-gating-share.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/unlock-protocol.com\/guides\/token-gating-with-unlock\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Guides","item":"https:\/\/unlock-protocol.com\/guides\/"},{"@type":"ListItem","position":2,"name":"Token Gating with Unlock"}]},{"@type":"WebSite","@id":"https:\/\/unlock-protocol.com\/guides\/#website","url":"https:\/\/unlock-protocol.com\/guides\/","name":"Unlock Guides","description":"Connect with your 1000 true fans with membership NFT","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unlock-protocol.com\/guides\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/unlock-protocol.com\/guides\/#\/schema\/person\/680ce03e12589286dbf4f0465b355a12","name":"Christopher Carfi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/unlock-protocol.com\/guides\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/58b2b2f69056d53f8fce3aaf9906496bdc7899c962dc12b68990f2327d5becd5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/58b2b2f69056d53f8fce3aaf9906496bdc7899c962dc12b68990f2327d5becd5?s=96&d=mm&r=g","caption":"Christopher Carfi"},"sameAs":["https:\/\/unlock-protocol.com\/"],"url":"https:\/\/unlock-protocol.com\/guides\/author\/chris\/"}]}},"_links":{"self":[{"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/posts\/4276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/comments?post=4276"}],"version-history":[{"count":0,"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/posts\/4276\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/media\/4277"}],"wp:attachment":[{"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/media?parent=4276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/categories?post=4276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unlock-protocol.com\/guides\/wp-json\/wp\/v2\/tags?post=4276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}