Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat not found 400 #2857

Closed
LsdLucifer opened this issue Apr 24, 2024 · 10 comments
Closed

Chat not found 400 #2857

LsdLucifer opened this issue Apr 24, 2024 · 10 comments

Comments

@LsdLucifer
Copy link

Hello. I have a user who should join a group via its chat ID. However, the user cannot do this because... TO JOIN THE GROUP, YOU NEED TO RECEIVE INFORMATION ABOUT THE GROUP, WHICH CANNOT BE OBTAINED WITHOUT JOINING IT...

@LsdLucifer
Copy link
Author

Can I somehow retrieve data about groups (chats) from another user-bot's db.sqlite for my new user-bot?

@levlam
Copy link
Contributor

levlam commented Apr 24, 2024

No. You can't access chats by their identifier. You must find them in the same way as you would do in any Telegram app.

@LsdLucifer
Copy link
Author

@levlam How can I implement functionality for my program to automatically join a group and subscribe to it?

@levlam
Copy link
Contributor

levlam commented Apr 24, 2024

You need to do exactly the same actions as you would do in a Telegram app.

@LsdLucifer
Copy link
Author

@levlam Why does TdApi.JoinChat even exist then? I want my program to add a user to a group. How can I do that? I'm not interested in doing it manually through Telegram.

@levlam
Copy link
Contributor

levlam commented Apr 25, 2024

You must do the same actions with appropriate methods.

@LsdLucifer
Copy link
Author

@levlam When I use this method, I get a 400 error 'chat not found,' as I mentioned above. Please provide an example of using this method.

@levlam
Copy link
Contributor

levlam commented Apr 26, 2024

You don't enter chat identifier in apps. You must find the chat first in the same way you do in the apps.

@LsdLucifer
Copy link
Author

@levlam I understand. You're suggesting that I manually enter the Telegram app and join the group. However, I have a link and a chat ID for the group. I want to join it automatically without opening Telegram. How can I use tdlib Java to join groups using their links or chat IDs? Ideally, I'd like to join via a regular link. (I've been able to join using invitation links, but I need to join the group via a regular link).

@levlam
Copy link
Contributor

levlam commented Apr 30, 2024

No, I suggest that you call the same methods, you would use in any other app.

Any internal link can be processed using getInternalLinkType and following documentation for the returned object.

@tdlib tdlib deleted a comment from harlene83774179 Apr 30, 2024
@levlam levlam closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants