php-telegram-bot / core

PHP Telegram Bot based on the official Telegram Bot API
MIT License
3.79k stars 949 forks source link

Group invitation #1407

Closed OurWin closed 10 months ago

OurWin commented 10 months ago

Hello everyone, thank you for your work. It provides a fantastic foundation for my project!

After reading and re-reading the documentation, I still can't figure out how to invite a user to a group, even though I see that it's possible in the API. Any ideas on how to implement this?

TiiFuchs commented 10 months ago

Where did you see that it is possible in the API? I can't find anything like that.

The Bot can create a ChatInviteLink, but it is not possible to share this link to users that the bot hasn't interacted with before. It is not possible for the bot to invite users to a group WITHOUT interaction.

Maybe I'm missing something. It would help if you can elaborate on what you're trying to do exactly.

OurWin commented 10 months ago

Maybe I didn't understand this method :) https://core.telegram.org/method/channels.inviteToChannel

jacklul commented 10 months ago

Maybe I didn't understand this method :) https://core.telegram.org/method/channels.inviteToChannel

Wrong API docs, what you need is Bots API - https://core.telegram.org/bots/api

OurWin commented 10 months ago

Thank you, @jacklul !