Go-whatsapp: Getting banned

Created on 14 Aug 2020  Â·  40Comments  Â·  Source: Rhymen/go-whatsapp

For past 1 week, all of the numbers I'm using are getting banned after few hours i log in using this library, I'm not using proxy & running 4 bots on same vps, can anyone tell me what's wrong here? Should I use proxies or something else?

Most helpful comment

Hi ,
@ramonck First of all, we are a community not a private company and we don't expect that kind of talk, you have a problem then show it to us with the logs and some codes to understand what you do.
Such talk is totally unacceptable because society tries to provide the best assistance.

I have great relationships with @Ased2235 and he told me that the problem is not related to Go lib in any way, it is related to the massive report of his number because he managed to use lib to manage groups, and some bad people don't like his successes, so they report his number. Anyone can report a number!

I'm moving away from this library as I had another one working fine and I'm actually surprised with this result here.

Are you threatening the community! you are free to do whatever you want to do.
But It would be nice if you tell the name of the node.js lib so we can contact the author to see if we have any error to fix it.
Bear in mind that the Go is much more powerful than nodeJs I'm talking about RAM / CPU / IO usage.
NodeJs is a great platform, but Go is more fast than it.

You are welcome to share your experience and how you got the "MessageStatus = 0" since I never have this problem!

All 40 comments

are you sending AD messages, spam, to a number which they don't have you in there contact list?

And what do you mean by banned m you can not use WhatsApp any more on those numbers!

@SchulteMK What do you think?
do we need to run each number on its own proxy!

are you sending AD messages, spam, to a number which they don't have you in there contact list?

No, the bot only works in groups & only send msg on Cammands,

And what do you mean by banned m you can not use WhatsApp any more on those numbers!

Yes, i email them & they reopened 1 account but after i login again, they banned it after 3 hours & they aren't replying.

Do you email WhatsApp?
Well, I think working with groups is kind of spammy since your message arrives to more than one recipient at the same time.
Let see if you use a proxy what is the result!
can you test the API with a proxy!

Do you email WhatsApp?
Well, I think working with groups is kind of spammy since your message arrives to more than one recipient at the same time.
Let see if you use a proxy what is the result!
can you test the API with a proxy!

Yes i did sent email to whatsapps & this was their response
Screenshot_20200814_034930
& sure I'll test it with a proxy & reply here here, but here is the thing, i just switched my vps ip 3 days ago but even after that, they banned all my accounts. So I was wondering if the causes is that i have too many groups & desided to make an account which have 10 groups, & to my sprise it got banned after 30 minutes 😅😅 so I'm lost here, is it the ai i setup 1 month ago cause of the or something else? Thanks for your help tho

Well, that is very serious. I am not sure if this related to the IP address.
I think there is a problem with the API which it does send a client version, but WhatsApp chrome (i think) it does not send any
https://github.com/Rhymen/go-whatsapp/issues/429
I am not sure.

but WhatsApp is talking about something unofficial! I am not sure if that including chrome, but I am sure if you invite people to the groups and they don't have your number in there address bock, you will get banned, and I can see how this happened.

I am 80% sure it is how you use the API if you are replaying as an auto responder. then you will have no problem
even if you use the official android and invite users to your group and they don't have your number in their address book. this is the key. you will get banned after some time.

What I am sure about is the following:
Your device is who sent the message at the end, not the API. the API sends the message to your device, then your device who takes the lead to send the message.

So Whatsapp doesn't care about the WebClient, at the end your device who sent the messages.
I am not sure if you are using the official WhatsApp Application or the altered one.

Using a proxy ,,,,, I do not quite sure about that, since I go with the idea that your "activity" is suspicious to WhatsApp!

Whatsapp will ban every one if they want to but as long as we are using the lib to REPLAY to who sent us or send messages to who have our NUMBER without spamming by sending a lot of messages. to a lot of distance at the same time.

Again, I am not sure and I would be very happy if @SchulteMK shares what he thinks about this!

Well I'm thinking about #429 too & searching if there's a way but i still doesn't understand how we got that.

but WhatsApp is talking about something unofficial! I am not sure if that including chrome, but I am sure if you invite people to the groups and they don't have your number in there address bock, you will get banned, and I can see how this happened.
Hmm i kinda a disagree with you here, i already tried to invite only my friends to use bot but still lead to issues but if i go & chat in other group with my unban account it works fine, it's been 3 days & that account is still active.

I am 80% sure it is how you use the API if you are replaying as an auto responder. then you will have no problem
even if you use the official android and invite users to your group and they don't have your number in their address book. this is the key. you will get banned after some time.

What I am sure about is the following:
Your device is who sent the message at the end, not the API. the API sends the message to your device, then your device who takes the lead to send the message.
So you're saying it's the phone I'm using the issue here? Cuz I'm using honor 8x with official whatsapp i don't see why they have the issue with this device since its fully supported.

So Whatsapp doesn't care about the WebClient, at the end your device who sent the messages.
I am not sure if you are using the official WhatsApp Application or the altered one.

I'm using official whatsapp business since the mod one keep crashing. So for now, i won't use proxies since it's confirmed that it's nothing to do with ip & wait for @SchulteMK to share his thoughts.

The problem is clear,
You are inviting a lot of users to a group, WhatsApp adds those users to the group.
Now we are not sure if your phone number available on the user's contact list since you can invite someone even if he doesn't have your phone number in his contact list.

Now you send a message to the group. let's say you have 100 users in the group.
or maybe you have 10 groups each one has 10 users invited.

You want some how-to send Advertisement, I am not sure ...
Now if 3% of users click on it is spam. they will smoke your number.

I am 100% sure this is the problem, and I will tell you why there is a lot of users who uses this API and
https://github.com/sigalor/whatsapp-web-reveng
A lot...
Me my self using this API with more than 7 numbers. BUT I NEVER DO GROUPS.

if there is a problem with the API, believe or not you will find a looooot of issues talking about banning numbers.
I am not sure what you are doing,

You can contact me directly [email protected] if you like to take privately

Me my self using this API with more than 7 numbers. BUT I NEVER DO GROUPS.
You think it's the groups which caused this issue? I mean groups are meant for public purposes, around 95% groups on whatsapp are strangers.

if there is a problem with the API, believe or not you will find a looooot of issues talking about banning numbers.
That's why i started this issue
I am not sure what you are doing,

You can contact me directly [email protected] if you like to take privately
Check your email

I am not sure if it related to API , but today i note this
[checkNewVersion]./main
Client has version 0.4.2080
Server has version 2.2033.7
New major detected 2

And there is no clientvirsion sent via chorme!
@Rhymen @SchulteMK

Hi

I also got the same issue, actually what I have noticed is that this library is not handling well the read messages scenario, I'm pushing for reading the messages but they're getting flagged as errored. "MessageStatus = 0"

Whatsapp didn't ban my number yet but the read structure of the messages need to be well sorted out so the final status of the messages doesn't stay errored out. This is what's occuring with a very simple example and Whatsapp ends up banning the IP or server folders for a while so we don't continue the testing and everything else.

This should be addressed from how the library works on flagging these messages that's very important step.

I'm moving away from this library as I had another one working fine and I'm actually surprised with this result here.

I was using it to learn Golang and all but guess I have to go back to the good and old NodeJS :).

Hi ,
@ramonck First of all, we are a community not a private company and we don't expect that kind of talk, you have a problem then show it to us with the logs and some codes to understand what you do.
Such talk is totally unacceptable because society tries to provide the best assistance.

I have great relationships with @Ased2235 and he told me that the problem is not related to Go lib in any way, it is related to the massive report of his number because he managed to use lib to manage groups, and some bad people don't like his successes, so they report his number. Anyone can report a number!

I'm moving away from this library as I had another one working fine and I'm actually surprised with this result here.

Are you threatening the community! you are free to do whatever you want to do.
But It would be nice if you tell the name of the node.js lib so we can contact the author to see if we have any error to fix it.
Bear in mind that the Go is much more powerful than nodeJs I'm talking about RAM / CPU / IO usage.
NodeJs is a great platform, but Go is more fast than it.

You are welcome to share your experience and how you got the "MessageStatus = 0" since I never have this problem!

@SchulteMK , as you can see we need to be more interactive with the community and improve the lib as much as we can, one problem is the version updates and each time we have to add the version by hand which is a problem. why don't we add a method to check the version once we start the API?

Hi @beshoo why am I threatening the community? I'm just being honest on my words that is it.
You are taking things too personally I believe I don't have any strong feelings about any specific technology or library.
But I totally agree with you about speed, the Golang is great in terms of speed is comparable with C++ from my experience so far.
I'm not sure that the version number is an issue, I followed your suggestion in the other issue you opened about updating the version number in the session.go file and that's how I handled it.
There should be some built in default in the message parsing for example the HandlerTextMessage is always trying to parse everything so maybe having another prebuilt function were you're already filtering the MessageStatus and only dealing with the new messages is probably a good idea to only work and fetch the new messages.
Another idea for this library here is basically making sure that there's always the message "read" on the output of this same pre-built function, Whatsapp needs a clean way out of the message read notification and my issue yesterday was that.
I can share here my code for yesterday but it's in another computer so it will be later on tonight.

You are taking things too personally

We spend hours upon hours testing and sharing talks and PL, at least show some respect to what @SchulteMK and others did. it is a very hard job.

It is not related to any technology we are open to anyone and we like to share the info.
But you are just talking! why don't you show steps that I can follow to have this error?

I am not sure what is your text handler! show it to us! it is not that big deal.
I agree with you that the lib has slow update progress, but it is all done, and once any great problem appears, such as QR not working, I guarantee to you that all members will be on board within one hour even in holidays.

I see how much love in this lib that is why your words breakthrough!
Now. what I need from you is the following.
show us steps to reproduce the error.

Regarding banning the number.
I believe if something not correct with Whatsapp you will not log in at all. but I believe it has to follow the version each day.
If you know GO it will be great if you make a method to check the version (which already available in the example directory)
and utilize the version once we start the lib.

Hmm as far as I noticed, it's not related to this library, as i tried node one & i still got banned. So i think it's users who is reporting to our numbers & whatsapps noticed that we aren't using official OS.

Hi @beshoo why am I threatening the community? I'm just being honest on my words that is it.
I'm not sure that the version number is an issue, I followed your suggestion in the other issue you opened about updating the version number in the session.go file and that's how I handled it.
As far as me & @beshoo confirmed, banning is not related to that but we can always use the latest version as there's no harm in it either way.

As for threatening, i think we all have different options so it's better to leave it alone rather than arguing with each other, we'll learn more from becoming friends rather than arguing about it.

Yes I don't understand why, I can program from PHP to C++ to Java.. to NodeJS and now a days learning Golang so actually I'm not sure why the hard feelings, I respect the work that people have put into any library and in no means I mean to disrespect anyone at all really so if you felt that way @beshoo I'm sorry but sometimes I just say what I feel and maybe it might have sounded bad for you but that was not my intent at all my idea is just to share what I have seen in other places and help you guys out that's always the idea to help.

Great respect to you, it is just misunderstanding, l am sorry as well.

Lets focus on the problem, let me see the steps..

Regard

On Fri, 18 Sep 2020, 5:16 pm Ramon Lima, notifications@github.com wrote:

Yes I don't understand why, I can program from PHP to C++ to Java.. to
NodeJS and now a days learning Golang so actually I'm not sure why the hard
feelings, I respect the work that people have put into any library and in
no means I mean to disrespect anyone at all really so if you felt that way
@beshoo https://github.com/beshoo I'm sorry but sometimes I just say
what I feel and maybe it might have sounded bad for you but that was not my
intent at all my idea is just to share what I have seen in other places and
help you guys out that's always the idea to help.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Rhymen/go-whatsapp/issues/430#issuecomment-694894540,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABDLT2ZLG7U6CZXZT6OZIUDSGNTR7ANCNFSM4P67ACYQ
.

Yes no problem it's life.

Regarding the issue this is what I see was my issue to gettting "blocked" but they didn't block my IP as I originally stated actually they do another type of block I don't remember the name exactly but they sort of pin that from this specific session connection to not reconnect.
Because using my device was all normal and all it was just that web session connectivity.
I'm not using any proxy or anything just playing around here and all with the code.
The ban is a little bigger than I expected initially because actually if I re-import the library it still doesn't work. It seems it's something flagged with my machine or user or something it's not even folder structure related.

error logging in: restoring failed: admin login responded with 401

exit status 1

The code that created the flagging ban from the web session after executing 3 times:

func (h *waHandler) HandleTextMessage(message whatsapp.TextMessage) {
        msg := whatsapp.TextMessage{
            Info: whatsapp.MessageInfo{
                RemoteJid: message.Info.RemoteJid,
            },
            Text: "Hello response :)",
        }

        _, err := h.c.Send(msg)
        if err != nil {
            fmt.Fprintf(os.Stderr, "error sending message: %v", err)
        }
}

After I identified the issue of sending too many return messages at the sametime because there was no filtering I created an if to actually filter out and only send when it made sense, but I still saw too many returns and saw that a couple of the messages had to Status = 0 so I also added the filtering out the 0 status messages. But when I got to this step I was already on my 3rd tryout and the library has already sent the same reply message 15 - 20 times.

func (h *waHandler) HandleTextMessage(message whatsapp.TextMessage) {
    if message.Info.FromMe == false && message.Info.Status != 3 && message.Info.Status != 0 {
        fmt.Printf("%v", message.Info.Status)

        h.c.Read(message.Info.RemoteJid, message.Info.Id)

        msg := whatsapp.TextMessage{
            Info: whatsapp.MessageInfo{
                RemoteJid: message.Info.RemoteJid,
            },
            Text: "Hello response :)",
        }

        _, err := h.c.Send(msg)
        if err != nil {
            fmt.Fprintf(os.Stderr, "error sending message: %v", err)
        }
    }
}

After this last version I'm finally filtering and only responding to what makes sense but I'm still not sure if just the Read is enough to satisfy the MessageStatus requirement so I really wanted to understand this step of the library on the mechanic of the session if I should of done maybe some "typing" before hand or maybe put some timeout since the response time is crazy fast?

The weird thing now is that I just tried another library here on the same machine and it worked there's no block there, that's very weird stuff trying to understand what the block is actually.
The block continues with a new "git clone" from the library, weird stuff, going to examples folder and running the receiveMessages.
On the other library it worked fine now from the same machine, weird.. haha crazy stuff.

h.c.Read(message.Info.RemoteJid, message.Info.Id)

This is your problem, in my script, I only read what I need to.

check this updated version of your code, it sends typing as well as read! please fix the handler and the connection parm.

var StartTime = uint64(time.Now().Unix()) // once you start the API we save the start time
func (h *waHandler) HandleTextMessage(message whatsapp.TextMessage) {
    if message.Info.FromMe == false && message.Info.Timestamp  > StartTime {
    fmt.Printf("%v", message.Info.Status)
    h.c.Read(message.Info.RemoteJid, message.Info.Id)
    time.Sleep(500 * time.Millisecond)
    _, err = h.c.Presence(message.Info.RemoteJid, wa.PresenceComposing)
        if err != nil {
                log.Infof("Send Text Presence %v", err)
                return err
        }
        time.Sleep(100 * time.Millisecond)
        msg := whatsapp.TextMessage{
            Info: whatsapp.MessageInfo{
                RemoteJid: message.Info.RemoteJid,
            },
            Text: "Hello response :)",
        }
        _, err := h.c.Send(msg)
        if err != nil {
            fmt.Fprintf(os.Stderr, "error sending message: %v", err)
        }
    }
}

h.c.Read(message.Info.RemoteJid, message.Info.Id)

This is your problem, in my script, I only read what I need to.

check this updated version of your code, it sends typing as well as read! please fix the handler and the connection parm.

var StartTime = uint64(time.Now().Unix()) // once you start the API we save the start time
func (h *waHandler) HandleTextMessage(message whatsapp.TextMessage) {
  if message.Info.FromMe == false && message.Info.Timestamp  > StartTime {
  fmt.Printf("%v", message.Info.Status)
  h.c.Read(message.Info.RemoteJid, message.Info.Id)
  time.Sleep(500 * time.Millisecond)
  _, err = h.c.Presence(message.Info.RemoteJid, wa.PresenceComposing)
        if err != nil {
                log.Infof("Send Text Presence %v", err)
                return err
        }
        time.Sleep(100 * time.Millisecond)
      msg := whatsapp.TextMessage{
          Info: whatsapp.MessageInfo{
              RemoteJid: message.Info.RemoteJid,
          },
          Text: "Hello response :)",
      }
      _, err := h.c.Send(msg)
      if err != nil {
          fmt.Fprintf(os.Stderr, "error sending message: %v", err)
      }
  }
}

hmm i don't think this is the issues here as i never used Read so as far i know there's nothing wrong with this lib as i already told @beshoo that there's 2 bots which i'm using for 1 year but never got banned once.

Hi all, about this topic, i have one problem, begin started from +- 1 month.

I have +- 60 VPS running this lib, using interface like Whatsapp web, but multi-user, chatbot, etc..

My problem is, on numbers with more messages traffic, the Whatsapp cant works on device.
The devices not receveid messagens, and not send too.

On device, show is connected on "whatsapp web", but on de the lib not see this, and not work.

The most stranger is that point, at smartphone messages not down. And, if i send message from another device, out of system, the message is show only one 'tic', like message only receveid only by whatsapp server.

After +- 5 hours, all works again..

Somebody see somelike this!?

Sorry my bad english..

Unfortunately, I can not understand your English. Sorry...
But try to use WhatsApp business, since it designed to auto reply on a way
status.

Regard

On Tue, 6 Oct 2020, 12:06 am Tiago Oliveira de Jesus, <
[email protected]> wrote:

Hi all, about this topic, i have one problem, begin started from +- 1
month.

I have +- 60 VPS running this lib, using interface like Whatsapp web, but
multi-user, chatbot, etc..

My problem is, on numbers with more messages traffic, the Whatsapp cant
works on device.
The devices not receveid messagens, and not send too.

On device, show is connected on "whatsapp web", but on de the lib not see
this, and not work.

The most stranger is that point, at smartphone messages not down. And, if
i send message from another device, out of system, the message is show only
one 'tic', like message only receveid only by whatsapp server.

Somebody see somelike this!?

Sorry my bad english..

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Rhymen/go-whatsapp/issues/430#issuecomment-703888650,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABDLT23SGKFVZVFOBAT24R3SJIYMBANCNFSM4P67ACYQ
.

Okay, I'll try with Google ..

I have + - 60 vps running the library, we created an interface similar to whatsapp web, but with features like multi-users, chatbot, automatic responses, among others.

It happens that in instances with more traffic, something like 2000 messages per day, for about 1 month, it seems that Whatsapp does a type of blocking, causing no message to be delivered to the number connected in the system.

In some cases, this number, through the device, is able to send messages, but receives nothing.

It shows on the screen of the device, as if it were connected to the system, but through the library, no .. Go says it was not possible to connect.

After about + - 5 hours, the "block" is undone and the messages are returned to the number.

Has anyone had this problem?

[] s

Great, now it is more clear, Thanks Goole :)
I think 2000 messages per day is something that may bring attention to the number.
I advise you to test whatsap business application, it designed to send a lot of messages at the same time;

More to say is the timeframe between messages, I believe the 2000 message is a big number to handle per day by WhatsApp.

Update, Are you using a proxy of you are counting on the server IP address?
I advise you to use a proxy with each number.

In fact, most numbers are using whatsapp business anyway.

As for the proxy, no, I'm not using ... what software do you use for proxy?

In fact, when the problem occurs, I tried to change the IP, change the instance, change the data center and even, the provider of iaas .. sometimes it works again, but for a few minutes.

It seems to me more like a number block, not the server / ip.

[] s

Once the number in the red zone you can not depend on changing the proxy.
I advise you to use a proxy for each number. you can search the API and learn how to use a proxy.

How many numbers on the same VPS are running?

How many numbers on the same VPS are running?

Only one

Then it is your massive amount of messages.

Regard

On Tue, 6 Oct 2020, 4:12 pm Tiago Oliveira de Jesus, <
[email protected]> wrote:

How many numbers on the same VPS are running?

Only one

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Rhymen/go-whatsapp/issues/430#issuecomment-704258948,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABDLT246J5DMWF2GHMXWRMLSJMJTBANCNFSM4P67ACYQ
.

@beshoo How many messages would you recommend to send, say on a per hour basis, given that the messages sent by the bot would mostly be in response to what the user sent?

How many numbers on the same VPS are running?

Only one

Well i disagree, as I'm running 7 numbers & 3 of them never got ban if ppl don't report them. I noticed this when i added bot in friend's groups & ask them to spam & it didn't got banned note that bot send over 100 msg/hour but i did the same thing in other groups & got banned in 3 days.
Here's the few tips i think will useful for you guys:
Don't make bot active 24/7, close it for at least few hours per day
Limit 150 groups per number, This is i confirmed after getting few bans
Use gb whatsapp, i can't say if this will work for sure but i seen someone suggesting that ao it's worth a shot.

Well i disagree, as I'm running 7 numbers & 3 of them never got ban if ppl don't report them. I noticed this when i added bot in friend's groups & ask them to spam & it didn't got banned note that bot send over 100 msg/hour but i did the same thing in other groups & got banned in 3 days.
Here's the few tips i think will useful for you guys:
Don't make bot active 24/7, close it for at least few hours per day
Limit 150 groups per number, This is i confirmed after getting few bans
Use gb whatsapp, i can't say if this will work for sure but i seen someone suggesting that ao it's worth a shot.

I was looking into creating as many groups as possible (500+) per number. Won't be spamming anyone. Users would join via the invite link and the bot would reply to their messages. Would you still not recommend creating 150+ groups per number?

Well i disagree, as I'm running 7 numbers & 3 of them never got ban if ppl don't report them. I noticed this when i added bot in friend's groups & ask them to spam & it didn't got banned note that bot send over 100 msg/hour but i did the same thing in other groups & got banned in 3 days.
Here's the few tips i think will useful for you guys:
Don't make bot active 24/7, close it for at least few hours per day
Limit 150 groups per number, This is i confirmed after getting few bans
Use gb whatsapp, i can't say if this will work for sure but i seen someone suggesting that ao it's worth a shot.

I was looking into creating as many groups as possible (500+) per number. Won't be spamming anyone. Users would join via the invite link and the bot would reply to their messages. Would you still not recommend creating 150+ groups per number?

Yes, my bot is exactly the same as discord so ye. If you have more groups then use multiple numbers & use database to link them. Well if you are sure that ppl won't report you, then you can try it.

@Ased2235 is all the number use the same phone ?

@Ased2235 is all the number use the same phone ?

No, we ran on different phones but you can run 3 bots per device if you want.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tkovs picture tkovs  Â·  3Comments

xnodcorp picture xnodcorp  Â·  3Comments

elpulga picture elpulga  Â·  4Comments

sbruder picture sbruder  Â·  9Comments

Leonardo-Crespo picture Leonardo-Crespo  Â·  6Comments