akshettrj / watgbridge

A forwarder from WhatsApp to Telegram written in GoLang
MIT License
165 stars 40 forks source link

Where am I expected to find the required values? #33

Closed GingkoFr closed 10 months ago

GingkoFr commented 10 months ago

Hello.

I've just tried to build your application. It seems to compile fine on Linux Debian 12 (with just a deprecation warning). But in your installation instructions, you wrote :

Copy sample_config.yaml to config.yaml and fill the values, there are comments to help you.

In the config.yaml file, I have :

telegram:
  bot_token: 186779
  #api_url: http://localhost:8082 # Uncomment if you have a local bot API server running (for bypassing file size limits)
  self_hosted_api: false
  owner_id: 704338780
  sudo_users_id:
    - 704338780
  target_chat_id: -100423424      # This is the chat where messages will be forwarded
  skip_video_stickers: false      # Setting this as true will stop trying to convert telegram video stickers to webp and sending them
  skip_setting_commands: false    # This will not show you list of commands when you start typing / in telegram

… with several numeric values which certainly don't belong to me.

Where am I expected to find the values to put instead? There are no comments to help me about that. The only one that I may have found is the bot_token, but still, it doesn't looks like a 6 digits value.

And I suppose that the WhatsApp part may have values that I will have to find, too.

Gingko.

DESTROYER-32 commented 10 months ago

well use the bot_token as it is, it's just for example there as for owner_id and sudo_user_id you can use your own telegram id and can get it by sending /info to @metabutlerbot also for target_chat_id create a private group add @metabutlerbot to it and send /id to get chat id

akshettrj commented 10 months ago

For the Telegram part, refer to Destroyer's answer above.

For the WhatsApp part, refer to the description of the YouTube video: https://www.youtube.com/watch?v=xc75XLoTmA4

GingkoFr commented 10 months ago

For the Telegram part, refer to Destroyer's answer above.

For the WhatsApp part, refer to the description of the YouTube video: https://www.youtube.com/watch?v=xc75XLoTmA4

OK, thank you very much.

Likely it is OK for the Telegram part (although I can't be sure, I need both ends in order to be able to check everything), but for the WhatsApp part, I cannot find the needed part in you video.

Around minute 7'00" it is said that it will be told later about how to get the values with xxxxx inside, but actually nothing of this kind seems to be told later in the same video.

I don't know how to link to a given user and/or a given chat or group in WhatsApp either.

I suppose this should have been processed through the QR code, but after reading the QR code, nothing happened in WhatsApp. Maybe I did it badly, so I would like to try again from the beginning. Unfortunately, if I try again, the QR code not longer appears.

How can I reset everything and start over from scratch?

… and last but not least, I am not a native English speaker, so it is difficult for me to watch an English video. It is very possible that I missed something inside. Is it possible to have written answers?

Regards,

Gingko

akshettrj commented 10 months ago

Yeah I forgot to show how to get WhatsApp IDs in the video, thats why I said check the description of the video. Anyways I am putting the relevant part here:

Getting WhatsApp group IDs: Launch the executable once and then:

  1. Either send .id in the WhatsApp chat
  2. Or send /getwagroups to the Telegram bot In both the cases remove the characters starting from @ in the IDs

The WhatsApp user IDs are generally the phone number (with country code). You can find your contacts using the /findcontact command after launching the bot once

Hope this helps you. Feel free to join the Telegram group (mentioned in README) for any more queries

GingkoFr commented 10 months ago

Ok.

Now I am at the point where I can list WhatsApp groups from my own Telegram bot.

But if I type something in the Telegram group, I see nothing in WhatsApp.

However, if type something in the WhatsApp group, I get the following in Telegram:

failed to create/find thread id for 'XXXXXXXXXXXXXXX@g.us':

unable to createForumTopic: Bad Request: the chat is not a forum

This becomes complicated because now, we have 4 kinds of spaces:

  1. groups
  2. channels
  3. forums
  4. chats

Maybe some are alias for another, but I'm not sure which ones.

Anyway, what I want to bridge is something looking like a forum. To bridge to something looking like a forum. Thus, not something looking like your Akshett's Projects channel (see below).

And by the way, I joined a Telegram … channel (I think) … named Akshett's Projects, but this doesn't looks like a very appropriate place for continuing this exchange.

Regards.

GingkoFr commented 10 months ago

Is there something like an incoming connection for which I should open a port in a firewall, or even adding a NAT routing?