How to avoid a ban
Guide to avoid WhatsApp bans when building bots: reply to messages, avoid spam and process messages in a way that complies with WhatsApp policies.
How to avoid a ban on WhatsApp when building bots.
Keep in mind that WhatsApp has strict policies to prevent spam and abuse of its platform.
If you're building a WhatsApp bot, it's crucial to follow these guidelines to avoid being banned.
Guidelines to follow
1. Only reply to messages
When building a WhatsApp bot, you should never start a conversation. Instead, your bot should only reply to the messages it receives. This will prevent your bot from being flagged as spam by users and WhatsApp algorithms.
You can use a short link http://wa.me/7911111111?text=Hi so the user clicks and starts the conversation with the bot first.
2. Avoid spam and unnecessary content
Sending too many messages or sending content the user didn't ask for can get your bot blocked. Make sure to only send relevant and useful information to the user. Also, don't send too many messages at once, as this can also trigger spam filters.
3. Other considerations
There are other guidelines to follow when building a WhatsApp bot, such as avoiding prohibited words and not sharing sensitive or inappropriate content. Read WhatsApp policies thoroughly to ensure your bot complies with all of its rules.
How to process messages
When processing messages in your bot, it's important to follow certain steps to avoid being flagged as spam. This is the recommended process:
- Send a "seen" before processing the message. You can do this by sending a
POST /api/sendSeenrequest to the Wazend API. - Start typing before sending a message and wait a random interval based on the message length. You can do this by sending a
POST /api/startTypingrequest. - Stop typing before sending the message. You can do this by sending a
POST /api/stopTypingrequest. - Send the text message using
POST /api/sendText.
By following these steps, you ensure your bot processes messages in a way that complies with WhatsApp guidelines and reduces the risk of being banned.
Reachout Timelock
Before a permanent ban, WhatsApp may silently restrict an account that messages too many new contacts: sending messages to new contacts fails with server error 463, while the session stays connected and in the WORKING state.
DO NOT restart, log out or re-pair the session: the restriction is lifted automatically. Pause sending to new contacts and read more in Events → session.status.
Message Capping
WhatsApp also applies a per-cycle quota on how many new contacts an account can message. Once the limit (CAPPED) is reached, sending messages to new contacts fails with server error 475 until the cycle resets, while the session stays connected and in the WORKING state.
DO NOT restart, log out or re-pair the session: the quota doesn't reset. Watch the warnings (FIRST_WARNING, SECOND_WARNING), reduce sending to new contacts and read more in Events → session.status.
How to avoid being banned
WhatsApp knows it's unusual for someone to send so many messages or bulk messages to people they've never talked to before, so it's considered spam or very fast marketing. Here are some tips before sending a message:
What you should and shouldn't do
- Important: DO NOT send messages that make people report you. As long as you don't get reports from the users you messaged, your account will be mostly fine.
- Having real content —like a survey the person agreed to— is different from a marketing message on a Saturday night.
- Send messages written in different ways; you can write a script that inserts random spaces into your text AND includes the person's (first) name.
- Never use fixed schedules; always send the first message, wait a random time between 30 and 60 seconds and then send the second message.
- Try to group contacts by their area code; WhatsApp expects a normal person to mostly talk to contacts within the same area as your phone number.
- Have a profile picture; sending a new message to someone with no picture/name/status will increase your chances of being manually flagged as spam.
- Send a "seen" confirmation for messages or disable it in WhatsApp.
- Avoid sending links that have previously been flagged as spam on WhatsApp or that aren't HTTPS. A URL shortener is a good idea.
- IMPORTANT: it's terrible to send messages 24/7 without giving a waiting time. Random delays between messages aren't enough; send a reasonable number of messages taking your conversion rate into account. For example: for one hour, send a maximum of 4 messages per contact who replied to your message and stop sending for an hour; then start again. Again, don't send messages non-stop without a gap between each "batch".
- Send only a short message when starting a conversation; you shouldn't send long texts or multiple messages without the user's consent.
Keep in mind
- For every message you send to someone who doesn't have your number in their contacts, they're asked whether it's spam. Being flagged as spam a few times (5-10) will get you banned.
- WhatsApp logs all your movements; you can even check the logs by sending a simple support email. They contain all kinds of information, so act as humanly as possible.
- Try to start conversations; as long as you send a message and the person doesn't automatically block you, everything will be fine. People constantly talking to you and adding you to their contacts will make your number stronger against a ban.
- Think of it as a points system: you start with zero points (negative if your device was previously blacklisted). If you go below zero, you're out. If you take part in conversations, you gain a point. If you're flagged as spam, you lose points. If you're blocked, you can lose more points.
- Finally, if your content is spam, it doesn't matter whether you use a broadcast list, a group or a direct contact; you'll still be banned.
- As an API, we say the only thing left to do now is to agree with WhatsApp policy, not send spam messages and always wait for the other person to contact you first.
- You can do this by sending an SMS to the person with a link to start a WhatsApp chat with you: https://wa.me/12132132131?text=Hi.