Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug / WhatsApp Ban]: Session disconnected with 401 device_removed and 24h restriction on Baileys engine

Open
#2,693 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
typescript
Domain
api, backend

Research direction

Start by examining the WHATSAPP-BAILEYS connection handling in v2.3.7 and the /instance/fetchInstances response for 401 device_removed; the issue names no source file or test. Reproduce or correlate the disconnect with the reported WhatsApp restriction using the available connection and Docker logs, and define done as an identified, actionable cause or a documented limitation with supporting evidence.

Written by the indexing model from the issue text.

Description

bug
Welcome!
  • Yes, I have searched for similar issues on GitHub and found none.
What did you do?

We configured an instance (taha_store) using the WHATSAPP-BAILEYS integration in Evolution API v2.3.7 running on a cloud VPS.

The instance was handling strictly reactive, inbound customer service requests (price queries and warranty questions). We implemented human typing presence simulation (sendPresence: composing with a 2-second delay) and anti-spam debouncing (2.5s window). No bulk/mass messages or broadcasts were ever sent.

What did you expect?

We expected the multi-device connection to remain stable and connected continuously for legitimate inbound customer service conversations.

What did you observe instead of what you expected?

The instance suddenly disconnected with error code 401 (conflict: device_removed).

On the physical phone, WhatsApp logged out of the linked devices session and displayed a 24-hour temporary restriction stating that an unofficial application was detected.

Error payload from /instance/fetchInstances:

{
  "instance": "tastore",
  "connectionStatus": "close",
  "integration": "WHATSAPP-BAILEYS",
  "disconnectionReasonCode": 401,
  "disconnectionObject": {
    "error": {
      "data": {
        "tag": "conflict",
        "attrs": {
          "type": "device_removed"
        }
      },
      "isBoom": true,
      "isServer": false,
      "output": {
        "statusCode": 401,
        "error": "Unauthorized",
        "message": "Stream Errored (conflict)"
      }
    }
  }
}

### Screenshots/Videos

_No response_

### Which version of the API are you using?

v2.3.7


### What is your environment?

Windows

### Other environment specifications

Docker

- OS: Ubuntu 22.04 LTS (Cloud VPS)
- Node.js version: v20+ / Docker latest
- Integration: WHATSAPP-BAILEYS
- Country / Region: Libya (+218)

### If applicable, paste the log output

_No response_

### Additional Notes

_No response_
Dominant language
TypeScript
Stars
9.7k
Forks
7.3k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evolution-foundation/evolution-api

All issues in evolution-foundation/evolution-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.