I'm trying to send a whatsapp message to a contact with given chatId that is saved in my phones
contacts (and retrievable with getContact or getAllContacts) but without an active chat yet.
So far I tried:
Send message to new contacts (non-added)
Also see Whatsapp links Be careful since this can pretty much could cause a ban from Whatsapp, always keep your contacts updated!
await client.sendMessageToId('5212234234@c.us', 'Hello from sulla! 👋');
but this does not work for me. Also i dont really get the difference between sendText and sendMessageToId as the parameters seem to be the same.
Furthermore I could find a method like create chat or chatId or anything similar.
Does anybody have thoughts on that? Any help is appreciated. TY very much.
Hi,
I'm trying to send a whatsapp message to a contact with given chatId that is saved in my phones contacts (and retrievable with getContact or getAllContacts) but without an active chat yet.
So far I tried:
but this does not work for me. Also i dont really get the difference between sendText and sendMessageToId as the parameters seem to be the same.
Furthermore I could find a method like create chat or chatId or anything similar.
Does anybody have thoughts on that? Any help is appreciated. TY very much.