Unlock Guides

Back

How to Token-gate Telegram with Unlock Protocol and Guild.xyz

Here’s how to token-gate a Telegram chat with Unlock Protocol and Guild.xyz. There are just a few steps to token-gating Telegram with Unlock Protocol. You’ll be up and running in no time! The steps are:

  • Set up a smart contract (we call them Locks) with Unlock Protocol
  • Create a Guild
  • Set up Telegram to token-gate
  • Connect Guild to the Telegram chat

Let’s get to it.

Set up your smart contract with Unlock Protocol

To create a new Lock, go to the Unlock Protocol homepage, connect your wallet and launch the app. On the Unlock Protocol dashboard, click the “Create Lock” button. 

The deployment process can be tracked on the relevant block explorer, and once the contract has been deployed, it will appear on the lock list on the Unlock Protocol dashboard. You can view the details of the lock and confirm all of the terms that have been set.

See the video below for a quick walkthrough of the membership setup process.

If you'd like to dig deeper into all the details on how to set up a membership program with Unlock Protocol, see our comprehensive guide on
How To Create a Membership Program.

Create a Guild

Now, create a guild on Guild.xyz. Connect your wallet, name your guild, give it a description, and select Telegram.

Set up Telegram

Now, open Telegram and start a new chat.

First, add the Guild bot (@guildxyz_bot) to your Telegram chat.

Then, in Telegram, configure the settings to allow the Guild bot to manage the chat.

Adjust the chat settings (set to Public, add a name, click “Done,” then set the chat back to Private and click “Done”).

Then, set the Guild bot as an admin on the chat.

After you’ve done the above, there will be a chat ID in the Telegram chat. (It’ll look something like -12345678.) Copy the chat ID, hop back over the the Guild.xyz site, paste the chat ID into the box, and save.

Ok! The Telegram side is in good shape now.

Connect Guild up to the Telegram chat

Head back over the the Guild.xyz site, and set up the token gate using an Unlock lock.

Save your updates, and you should be all set!

To invite someone to the token-gated chat, direct them to the Guild site for your guild. When someone attempts to join, Guild will manage the process and, if the visitor has the correct Unlock key in their wallet, Guild will link the new member over to the Telegram chat for you, seamlessly.

That’s it! You now have a token-gated Telegram chat.

Related

In a related guide, we showed you how to token-gate a Discord server using Unlock and Guild.xyz. Also, in February 2022, Guild’s Reka and Raz joined the Unlock Developer Meetup and shared more thoughts!

Was this article helpful?
YesNo

Table of Contents