Auties00 / Cobalt

Standalone unofficial fully-featured Whatsapp Web and Mobile API for Java and Kotlin
MIT License
611 stars 179 forks source link

TemplateMessages don't work in newer versions of Whatsapp #239

Closed Auties00 closed 1 year ago

Auties00 commented 1 year ago
          Hi @Auties00. You were right: now the one with Android 10 is not working (list and buttons, the rest is ok) but the one with Android 11 keeps working.

What's your first thought about where is the problem? So maybe I can check that out. I found out that this Android 10 phone was not working because I was testing and trying to see a difference between the nodes in a sent and shown msg and one that doesn't get sent nor shown, to at least have the status. The thing is that the msg is sent, but the receptor device is not making it visible.

Btw I'm on the last commit version and I did also tried with the latest mvnrepository stable one 3.2.1.

Originally posted by @lucasfmoreno in https://github.com/Auties00/Whatsapp4j/issues/206#issuecomment-1476958832

lucasfmoreno commented 1 year ago

A little update on this one: now the Android 11 stopped working too. So now all 3 devices (Android 10, 11, 12 and last version of whatsapp on each one) are not showing button or list messages.

So, i think it will progressively don't work on any Whatsapp after 2.23.5.78 version.

kampit commented 1 year ago

Any news for this button & list?

Auties00 commented 1 year ago

I need someone with a business api who can send a real template message to me so I can see what they changed. I've looked for a business using whatsapp from which I can get the message but I can't find any

kampit commented 1 year ago

I need someone with a business api who can send a real template message to me so I can see what they changed. I've looked for a business using whatsapp from which I can get the message but I can't find any

Button & list can still be used on web & iOS. This confirms on Android that it is blocked from the app itself. There is a function that WA validates to not display those buttons & lists on Android.

Auties00 commented 1 year ago

I need someone with a business api who can send a real template message to me so I can see what they changed. I've looked for a business using whatsapp from which I can get the message but I can't find any

Button & list can still be used on web & iOS. This confirms on Android that it is blocked from the app itself. There is a function that WA validates to not display those buttons & lists on Android.

So i have done some work and i have 2 guesses:

  1. Either they now check if your account is a business account and discard the message if it's a button
  2. They are implementing the hash check for business messages(I'll guess for security purposes) so as my library, or any other for that matter, doesn't handle that as of now it doesn't go through. I'll try to reverse it to ship a patch if this is the issue
lucasfmoreno commented 1 year ago

@Auties00 Auties do you have any knowledge about Whatsapp API (either Cloud or On-Premise)? Because I have a single question about it and can't find any answer to it. Don't know if this is the channel though, delete it if you think it's not.

It will be legal if i have just one backend, and i use it as a webhook for multiple WABAs that i will manage myself for future clients? and send messages from that same backend with the API?

Because i kind of think that's a Business Solution Provider scheme, but from what i saw in order to become a BSP you have to apply with an app, but:

  1. If the app is just a backend and some simple console clients to send and receive from that backend and not a mobile app for instance, will applying (showing the "app") even be possible?
  2. If i will manage the clients accounts myself, there will be no need for them to register nor use the embedded sign up, i can register, validate the number, etc.

Anyway, thanks a lot! I think that this solution will remain valid for sending text, documents, etc. Having the enormous advantage of keeping access to the "real" mobile app and making login really simple compared to api.

Auties00 commented 1 year ago

@Auties00 Auties do you have any knowledge about Whatsapp API (either Cloud or On-Premise)? Because I have a single question about it and can't find any answer to it. Don't know if this is the channel though, delete it if you think it's not.

It will be legal if i have just one backend, and i use it as a webhook for multiple WABAs that i will manage myself for future clients? and send messages from that same backend with the API?

Because i kind of think that's a Business Solution Provider scheme, but from what i saw in order to become a BSP you have to apply with an app, but:

  1. If the app is just a backend and some simple console clients to send and receive from that backend and not a mobile app for instance, will applying (showing the "app") even be possible?
  2. If i will manage the clients accounts myself, there will be no need for them to register nor use the embedded sign up, i can register, validate the number, etc.

Anyway, thanks a lot! I think that this solution will remain valid for sending text, documents, etc. Having the enormous advantage of keeping access to the "real" mobile app and making login really simple compared to api.

Honestly I have 0 knowledge about that. For this issue, you can also read what I wrote here: https://github.com/adiwajshing/Baileys/issues/2631

Auties00 commented 1 year ago

Fixed all buttons except templates in 3.2.2

lucasfmoreno commented 1 year ago

Great! Working perfectly fine in my case! What was needed to do in order to solve it?

Auties00 commented 1 year ago

Great! Working perfectly fine in my case! What was needed to do in order to solve it?

A new node and the mediatype

lucasfmoreno commented 1 year ago

Not opening another issue because I don't know if there's a problem or if Whatsapp doesn't support it, but:

Is it possible to send a button (or a list) without any header at all? (Just buttons or just the hint in a list) because I'm seeing that on buttons there's an EMPTY header option but when I use that the msg is not sent.

Thanks! The regular buttons and list keep working well so far.

raajrush commented 1 year ago

What's happened with baileys repo ?

Auties00 commented 1 year ago

tracking in https://github.com/Auties00/Whatsapp4j/issues/278