Skip to content

Action: Create chat link

Generates a personalized link for users to join a channel or group. You can configure options such as expiration date, member limit, and more.

Requirements

For this action to work correctly, your bot must:

  • Be an administrator of the target channel or group.
  • Have the Invite Users via Link permission enabled.

How to configure the action?

1. Create the action

  1. Go to your bot and press 🛠 Edit to enter editor mode.
  2. Select the button or command where you want to add this action, or create a new one.
  3. Click on Actions 🌟🎯 New action🔗 Create chat link.
  4. Click on Configure 🛠 to set it up.

2. Configure the options

➡️ Channel or group

The @username or ID of the channel or group where the link will be generated.

➡️ Name (optional)

An identifier to easily recognize the link in the future.

➡️ Expiration (optional)

The date when the link will no longer be valid. Use the format DD-MM-YYYY HH:MM:SS (the time is optional). If not specified, the link will be permanent.

➡️ Member limit (optional)

The maximum number of users who can join using the link. It must be a number between 1 and 99999. If not specified, there will be no limit.

➡️ Request to join (yes | no) (optional)

If enabled, users using the link will need administrator approval to join. If this option is active, you cannot set a member limit.

3. Activate the action

Click ✅ Activate to activate this action and make it functional.


What does the action return through its ID?

You can retrieve the generated link using:

#ActionID.link#

Replace ActionID with the Action ID of this action (Create chat link).


In this example, we will create a join link for a channel.

Prerequisite

Before proceeding, add your bot as an administrator to the channel from which you will generate a link, with the Invite Users via Link permission.

1. Create a new button

  1. Enter edit mode by clicking 🛠 Edit in your bot.
  2. Click on ✳️ New button | command.
  3. Enter the button name, for example: Create link.
  4. Click on Actions 🌟 to configure the actions for this button.

2. Add the necessary actions

  1. Click on 🎯 New action and select 🔗 Create chat link.
  2. Click on Configure 🛠📢 Channel or group 📢 and enter the @username or ID of the channel.
  3. Return to the actions menu and activate this action by clicking ✅ Activate.
  4. Copy the Action ID of this action, as you will need it in a moment.
b) Action 2: Send message
  1. Click on 🎯 New action✉️ Send message.
  2. Click on Configure 🛠💬 Set message 💬 and enter:

    The generated link is:
    
    {#ActionID.link#}
    

    Replace ActionID with the Action ID of the Create chat link action that you just copied.

  3. Return to the actions menu and activate this action by clicking ✅ Activate.

Final result

  1. The user clicks the Create link button.
  2. The bot generates a personalized link and sends it to the user.