Telegram API Integration – Authenticate Entries


SweepWidget allows you to connect your Telegram bot so you can track if users follow you. This will make it so only verified followers of your Telegram channel will receive entries. To get started, you will first need to create a Telegram bot.

Create a Telegram bot

Create a Telegram bot with BotFather before connecting your bot to Telegram.

  1. Start a new conversation with the BotFather.
  2. Send /newbot to create a new Telegram bot.
  3. Once you are promoted, enter a name for your new bot.
  4. Give your new Telegram bot a unique username.
  5. Copy and save the Telegram bot’s access token (you must save this token to input into SweepWidget).
  6. Optional: to manually get the access token, send  /token to the BotFather.

Add your Telegram bot as an admin to your channel

First, choose which channel you want to users to follow from your SweepWidget giveaway. To API track the follows, you will need to add your Telegram bot as an admin to this channel.

1. Go to the info section of your channel and click on Administrators.

2. Search for the bot you want to connect.

Enable all of the features you want, and click Done.

Set up your Telegram entry method

Once you have your Telegram bot setup and you have connected it as an administrator to your channel, you will want to create the entry method in your SweepWidget giveaway.

First, go to create or edit a giveaway. Next, navigate to Ways Users Can Enter > Telegram > Follow A Channel.

Next, you will want to input the link to your Telegram channel and the channel name exactly as they appear.

Next, if you want to add API tracking, you must tick the radio button that says Use API validation (requires your own verification bot).

Next, you will want to specify if it’s a Public or Private TG channel. Then, you must input the API token from the Telegram bot you are connecting (remember, this bot must be an administrator of the channel you want users to follow).

That’s it! Now, when users go to follow your Telegram channel, it will prompt them to authenticate their account. Then, it will be able to track whether or not they’re following you. If they are, they will get an entry. If they’re not, they won’t get an entry until they follow you.