Skip to main content

3 posts tagged with "api"

View All Tags

· 4 min read
Ekene Eze

Token gating (AKA Token Granted Access) is a concept that has gained significant traction in recent years, particularly within decentralized autonomous organizations (DAOs) and non-fungible token (NFT) communities. At its core, token gating involves using on-chain assets to grant or restrict access to a community or a resource.

The concept of token gating was first popularized by the Collab.Land team, who made it possible for DAOs and other tokenized communities to verify membership through the possession of on-chain assets. A good example of this is how communities like Axie Infinity use Collab.Land to authenticate new users who are joining their community. New members are required to go through a one-time wallet connection flow, after which they will be assigned roles based on their asset holdings. These roles will give them a tailored experience in the community, like access to exclusive messaging permissions, private channels etc.

The success of this approach grew the Collab.Land ecosystem to over 50k communities with a reach of over 100MM. That is huge, but we’re not stopping there! We are moving to the next stage - exposing our infrastructure to developers. What if developers had the ability to gate or grant access to their websites or specific parts of their projects based on the possession of some specified on-chain assets? Well, they can, with our website token gating APIs.

Introducing Collab.Land’s Token Gating APIs

In January, we announced a new /access-control endpoint for token gating that allows developers to control access to their applications based on the possession of specific on-chain tokens. The endpoint accepts two parameters:

  • account - The wallet address of the user.
  • rules - The token gating rules that specify the assets that qualify a user.

For each rule, Collab.Land will return a response indicating whether or not the rule has been granted or denied for the user. Here’s a sample request to the Collab.Land /access-control endpoint:

POST https://api.collab.land/access-control/check-roles
BODY:
{
"account": "0x01c20350ad8..............7bca295",
"rules": [
{
"type": "ERC721",
"chainId": 1,
"minToken": "1",
"contractAddress": "0xbc4ca0edaxxx8a936f13d",
"roleId": "001"
}
]
}

Where: account represents the user's wallet address and rules is an array of objects representing each rule to be checked against the user's wallet. This call would return a sample response like this:

{
"roles": [
{
"id": "001",
"granted": true
}
]
}

With this, developers can build simple and if needed, complex token gating configurations that allow them to offer custom experiences to qualified users. To learn more about the Collab.Land token gating APIs, please read the official documentation or dive into a practical tutorial to build a gated website in minutes. You can also get your hands dirty with the Github repo.

How to Get Started

First, head over to the Collab.Land DevPortal and create a client application. The client app will provide you with the necessary credentials (API Key, secret and client ID) needed to interact with the Collab.Land APIs. With the client app created, you can leverage our token gating tutorial or this video to gain a better understanding of our implementation detail. For instance, if you want to build a token gated website with JavaScript, here’s a sample code snippet to call the Collab.Land /check-roles endpoint using fetch:

const res = await fetch(`https://api.collab.land/access-control/check-roles`, {
method: 'POST',
headers: new Headers({
Accept: 'application/json',
'X-API-KEY': process.env.COLLABLAND_KEY,
'Content-Type': 'application/json',
}),
body: JSON.stringify({
account: myWalletAddr, // pass in the user's wallet address
rules: [{}, {}], // pass in the rules to be checked
}),
});

With our token gating APIs, we are extending the successful access control patterns in our communities and DAOs to developers. With one endpoint, developers can gate and grant access to websites, web applications, games, mobile applications and so on.

I look forward to seeing what you build, and when you do, I’d be happy to amplify it for you. I've also linked a video tutorial on the Getting Started section to show you how to implement this API in a Next.js project specifically.

· 5 min read
Ekene Eze

Read on to learn how TheSuccessFinder team leveraged Collab.Land's APIs to enhance the security and exclusivity of their online communities. This process is even easier now thanks to the launch of the Collab.Land Developer Portal.

Introducing TheSuccessFinder

TheSuccessFinder (TSF) is a community platform designed to foster effective communication, collaboration, and knowledge sharing. With its four main features—leaders, communities, knowledge center, and events—TSF aims to create safe and secure online communities that provide valuable experiences for its users.

TSF empowers leaders to create text and audio communication channels such as announcements, community conversations, courses, and audio rooms with just one click.

The community feature within TSF is a space for synchronous conversations and working together on various projects by posting, replying, and using video collaboration.

The knowledge center within TSF hosts blogs and vlogs. New members can search for leaders based on their interests and connect with them through these knowledge-sharing resources, and also allows them to access educational content and gain insights from leaders in their areas of interest.

Additionally, through events in TSF, leaders offer events to their community. Members can conveniently purchase them with simple payment processing.

TheSuccessFinder commits to creating a safe and secure environment for leaders, while also empowering learners to connect and collaborate effectively.

Early Challenges: Building a Rewarding Community Platform

When developing TSF, the team faced the challenge of finding an existing platform that would facilitate effective collaboration, communication, and knowledge sharing for its users. And so, TSF created a platform that offers the positive aspects of existing platforms while addressing their drawbacks to provide a custom experience for their users.

To start, TSF implemented a Know Your Customer (KYC) process for community leaders. KYC ensured that leaders are competent in the areas they wanted to create communities for, preventing unknowns from diluting the value and authenticity of the platform. TSF used custom authentication solutions to ensure that only authorized users gained access to the appropriate communities, improving member safety. The TSF team sought user feedback to identify and address any loopholes or vulnerabilities encountered during the implementation process.

During the development process, TSF became increasingly aware of web3 technologies and their security benefits. By studying platforms like Discord, Telegram, and Facebook groups, the team realized the potential of integrating web2 and web3 technologies to enhance security and authorization.

Solutions: Leveraging Collab.Land for Enhanced Security and Access Control

During their search for a token gating solution, TSF discovered Collab.Land. Collab.Land appeared to be the perfect fit for their needs. Then, TSF conducted extensive research and reached out to partners familiar with web3 technologies. All signs still pointed to Collab.Land, as they were already working with tens of thousands of communities on Discord and Telegram.

Collab.Land's strong reputation and long track record gave TSF the confidence to pursue an integration. By integrating Collab.Land, TSF gained the ability to token gate and allow community leaders to define access requirements for their members.

“One of the major advantages of integrating with Collab.Land was eliminating workarounds. With token gating, users either have the required token or they don't, which ensures a secure and streamlined access restriction process.” ~ Brandon Straza (Founder, TheSuccessFinder)

Collab.Land provides a complete suite of token gating functionalities that go beyond regular RPC calls to check the balance of a wallet. With their APIs, developers can leverage Collab.Land’s comprehensive and scalable token gating engines to extend their community and project’s gating functionalities beyond the scopes of Discord and Telegram.

The integration was initially intended to only gate access to the communities section, but TSF soon expanded the Collab.Land implementation to other areas of the platform, including the knowledge center. Using Collab.Land, blogs, courses, and video rooms can be token gated, enabling community leaders to easily monetize their content and resources. For example, TSF recently integrated token gating into secure video rooms, allowing leaders to ensure that only users with the necessary tokens can enter video meeting rooms for enhanced security and exclusivity.

Integrating with Collab.Land's Token Gating API

TSF's integration with Collab.Land established a double layer of security for both leaders and learners. The platform has significantly reduced the risk of both fake communities and the dissemination of false information. Now, individuals entering the community are verified before accessing content or engaging, providing tremendous value and confidence for both TSF leaders and learners.

The integration process with Collab.Land presented a steep learning curve for TSF's developers, as they had no prior experience with web3 technologies or token gating systems. However, the intuitive nature of Collab.Land's token gating APIs, coupled with the comprehensive documentation and responsive support from Collab.Land's DevRel team, facilitated a smooth integration process. Whenever clarification or assistance was needed, TSF's developers relied on Collab.Land's DevRel team, who promptly addressed their queries and provided guidance.

Collab.Land also provided a suite of developer tools to facilitate integration and development, some of which were the API reference, documentation, tutorials, guides, and a comprehensive SDK for frontend development.

This process has been simplified by the launch of Collab.Land's Developer Portal where developers self-serve and create their own client-apps, submit miniapps to the marketplace, and leverage the Login with Collab.Land (LWC) flow to activate members.

Looking to the future, TSF believes that token gating technology will continue to play a pivotal role in shaping online experiences. The platform has already adopted token gating in more areas than initially planned. TSF remains committed to an ongoing partnership with Collab.Land and the continued utilization of token gating technology.

Visit the Collab.Land Developer Portal to start building your own integration today!

· 4 min read
Ekene Eze

Collab.Land is proud to announce the launch of its new Developer Portal and API product offering. These pivotal additions serve to broaden accessibility for developers, paving the way for further innovation within the comprehensive Collab.Land network of communities.

Introducing the Developer Portal

The Developer Portal provides a dedicated platform for developers to contribute their Miniapps to:

  • Create client applications and get access to API credentials
  • Contribute Miniapps to the Collab.Land Marketplace.
  • Leverage LWC flow to request user permissions for data access.

This significant evolution enables developers to reach over 50,000 communities who are actively seeking to enhance their members' experiences. Through the dev portal, developers can build and submit miniapps to provide to a vast array of applications and services for community admins to customize their communities.

First Look at Collab.Land APIs

For the first time, the Developer Portal offers developers access to Collab.Land's APIs. These APIs encourage direct interaction with Collab.Land's network, facilitating a seamless integration process for active members across various websites, platforms, or apps.

Tiered API Product Offering

Designed with diverse needs in mind, Collab.Land's API product is available in three tiers.

Free Tier: Ideal for newcomers to the API, offering limited requests and rate limits for initial experimentation and familiarization as well as development.

  • 10 requests per second
  • 10000 requests per month
  • 5 Max marketplace keys
  • 5 Max client apps

Paid Tier: Geared towards developers requiring higher request and rate limits. This tier covers most use cases, perfectly suited for those ready to incorporate the API into larger projects:

  • 15 requests per second
  • 1000000 requests per month
  • 500 Max marketplace keys
  • 500 Max client apps

Enterprise Tier: Customized to suit specific requirements, the Enterprise Plan is for brands or projects that need custom support or integrations demanding additional resources from the core team. For those interested in this plan, please direct all inquiries to the Collab.Land team.

API Use Cases

Build token gated websites and web applications

Build token gated web apps to provide additional functionalities to your community, fans or customers. With the website token gating features, you can gate / grant access to exclusive content and features on your site. Learn more.

Reach 50k+ communities on Collab.Land with miniapps

Build lightweight implementations of your projects that run on the Collab.Land bot as a miniapp. They are a great way to get your project in front of 50k+ community admins and 9M+ users. Learn more

Request user permissions for data access with LWC Flow

Leverage the Collab.Land LWC flow to request user permissions to access their data on Collab.Land. This will allow you to access user wallets and build custom experiences in your projects. The LWC flow follows the OAuth2 protocol, allowing applications to obtain an access token that can be used to interact with the Collab.Land API on behalf of the authenticated user.

Collab.Land remains committed to privacy and security. Accordingly, any use of the community APIs that involves member data will necessitate explicit user consent, reflecting best practices in data privacy and giving members complete control over their personal information.

Empowering the Web3 Journey

At Collab.Land we are dedicated to empowering multiple personas on their journey through web3. By offering developers more extensive access and powerful tools, we are fostering innovation and promoting accessibility within our network. Simultaneously, we stay true to our commitment to safety and privacy. The launch of the Developer Portal and new API product signifies a significant milestone in our ongoing mission to create a more interactive, personalized, and secure digital ecosystem and we can't wait to see what you all build.