evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

WhatsApp accounts requiring Passkey can no longer connect

Open ArturGPJ opened this issue 5 months ago • 53 comments

Welcome!

  • [x] Yes, I have searched for similar requests on GitHub and found none.

What type of feature?

Integration

What is the motivation for the request?

One of my WhatsApp accounts has started requiring a Passkey to link new devices. There is no option to disable it.

When I try to connect through the official WhatsApp Web, after scanning the QR Code it requires creating/using a Passkey before completing the login.

Image

However, with Evolution API (v2.4.0), after scanning the QR Code nothing happens. The Passkey prompt never appears, and after a while Evolution simply generates a new QR Code.

Logs:

connection: connecting hasQr: true qrcodeCount: 1

(scan QR Code)

...nothing happens...

hasQr: true qrcodeCount: 2

It looks like WhatsApp is waiting for the new Passkey authentication flow, but Evolution/Baileys never reaches that step.

Environment

Evolution API: 2.4.0 WhatsApp: Latest version Issue started only after this WhatsApp account began requiring Passkey. Other WhatsApp accounts that do not require Passkey still connect normally.

Is this a known issue? Is there already support planned for the new Passkey authentication flow?

Usage Examples

No response

How should the feature be developed?

No response

Additional Notes

No response

ArturGPJ avatar Jun 30 '26 13:06 ArturGPJ

Consegui pelo json, mas na IA gerei um script então por ele consegui fazer a importação do json sem precisar ser pela IA. Funcionando.

samucashow15 avatar Jul 06 '26 21:07 samucashow15

Só que ao pegar o json extraido, ele só funciona no api evolution, e para de funcionar na web, daí precisa desconectar da web para reconectar a web para continuar usando no navegador.

samucashow15 avatar Jul 06 '26 22:07 samucashow15

Consegui pelo json, mas na IA gerei um script então por ele consegui fazer a importação do json sem precisar ser pela IA. Funcionando.

@samucashow15 vc pegou o json gerado pela extensão do marcos ? Pode compartilhar o script que vc criou? crie um repositório aqui no Github pra gente ver o que vc fez! vlw

RogerioAmaral avatar Jul 07 '26 00:07 RogerioAmaral

Alguém sabe dizer se há alguma solução para visualizar as fotos postadas no status pelo n8n, só os outros veem, no meu próprio não aparece.

samucashow15 avatar Jul 07 '26 09:07 samucashow15

Consegui pelo json, mas na IA gerei um script então por ele consegui fazer a importação do json sem precisar ser pela IA. Funcionando.

@samucashow15 vc pegou o json gerado pela extensão do marcos ? Pode compartilhar o script que vc criou? crie um repositório aqui no Github pra gente ver o que vc fez! vlw

Sim, segue https://github.com/samucashow15/arqsevo , pra mim deu certo, usando o comando "node import_evolution_session.js" no powershell, na mesma pasta deve ter o wa-session.json . Precisa só editar os dados aí:

const INSTANCE_NAME = 'meu'; // Ex: 'whatsapp1' const EVOLUTION_API_URL = 'http://192.168.0.256:8080'; const GLOBAL_API_KEY = '95gfd9g5f9gfdgfdgfd4'; // Global API Key do Evolution

const DB_CONFIG = { host: '192.168.0.256', port: 5432, // Porta padrão do Postgres, mude se necessário user: 'postgres', password: 'evopass', database: 'evolution' // Nome do banco de dados (geralmente evolution) };

samucashow15 avatar Jul 07 '26 10:07 samucashow15

Consegui pelo json, mas na IA gerei um script então por ele consegui fazer a importação do json sem precisar ser pela IA. Funcionando.

@samucashow15 vc pegou o json gerado pela extensão do marcos ? Pode compartilhar o script que vc criou? crie um repositório aqui no Github pra gente ver o que vc fez! vlw

Sim, segue https://github.com/samucashow15/arqsevo , pra mim deu certo, usando o comando "node import_evolution_session.js" no powershell, na mesma pasta deve ter o wa-session.json . Precisa só editar os dados aí:

const INSTANCE_NAME = 'meu'; // Ex: 'whatsapp1' const EVOLUTION_API_URL = 'http://192.168.0.256:8080'; const GLOBAL_API_KEY = '95gfd9g5f9gfdgfdgfd4'; // Global API Key do Evolution

const DB_CONFIG = { host: '192.168.0.256', port: 5432, // Porta padrão do Postgres, mude se necessário user: 'postgres', password: 'evopass', database: 'evolution' // Nome do banco de dados (geralmente evolution) };

Vlw @samucashow15 vou testar.... uma dúvida, a conexão do WhatsApp WEB que foi extraída as creds pode ser usada via Browser? Ou não deve nem abrir no Browser?

RogerioAmaral avatar Jul 07 '26 13:07 RogerioAmaral

Consegui pelo json, mas na IA gerei um script então por ele consegui fazer a importação do json sem precisar ser pela IA. Funcionando.

@samucashow15 vc pegou o json gerado pela extensão do marcos ? Pode compartilhar o script que vc criou? crie um repositório aqui no Github pra gente ver o que vc fez! vlw

Sim, segue https://github.com/samucashow15/arqsevo , pra mim deu certo, usando o comando "node import_evolution_session.js" no powershell, na mesma pasta deve ter o wa-session.json . Precisa só editar os dados aí: const INSTANCE_NAME = 'meu'; // Ex: 'whatsapp1' const EVOLUTION_API_URL = 'http://192.168.0.256:8080'; const GLOBAL_API_KEY = '95gfd9g5f9gfdgfdgfd4'; // Global API Key do Evolution const DB_CONFIG = { host: '192.168.0.256', port: 5432, // Porta padrão do Postgres, mude se necessário user: 'postgres', password: 'evopass', database: 'evolution' // Nome do banco de dados (geralmente evolution) };

Vlw @samucashow15 vou testar.... uma dúvida, a conexão do WhatsApp WEB que foi extraída as creds pode ser usada via Browser? Ou não deve nem abrir no Browser?

Ao conectar no api evolution, automaticamente as mensagens pararam de funcionar no web, então desconectei do web, e criei uma nova conexão web, mesmo assim manteve a conexão do api, no caso ficaram duas conexões, a web e a do api.

samucashow15 avatar Jul 07 '26 13:07 samucashow15

I ran into this same problem and got a working end-to-end solution. Sharing here in case it helps others.

What's happening

WhatsApp is rolling out a mandatory authentication protocol called "Shortcake" (also called CRSC — Companion Registration via Secure Channel). When WhatsApp flags an account, it sends a passkey_prologue_request over the WebSocket after QR scan. The standard Baileys client doesn't handle this, so it silently ignores the request and loops back to generating a new QR code — exactly what the issue describes.

The fix

There's an open PR in Baileys (#2689 — feat(auth): add shortcake passkey companion-linking protocol (https://github.com/WhiskeySockets/Baileys/pull/2689)) that adds a signPasskeyAssertion callback to SocketConfig. When WhatsApp requests Shortcake, Baileys calls this callback with the raw WebAuthn challenge options and expects back the signed credential.

The problem is that signing requires navigator.credentials.get(), which only works in a real browser — not on the server. So the signing has to be delegated to a browser tab open on web.whatsapp.com.

Solution: a passkey bridge

I built a small bridge consisting of two parts:

  1. Server side — Wire the signPasskeyAssertion callback into Evolution API's Baileys socket config. When called, store the challenge in memory (with a 120s timeout) and expose two REST endpoints: GET /passkey/:instance/challenge (polled by the extension) and POST /passkey/:instance/assertion (receives the signed result).
  2. Chrome extension (MV3) — A service worker polls GET /passkey/:instance/challenge every 3 seconds. When a challenge appears, it injects into the web.whatsapp.com tab, calls navigator.credentials.get() with the WebAuthn options, serialises the full assertion as JSON, and POSTs it back to the server.

Key technical findings

  • WhatsApp sends passkey_request_options as UTF-8 JSON bytes (not CBOR), so you can parse and pass directly to navigator.credentials.get()
  • The challenge uses URL-safe base64 (- and _ instead of + and /) — standard atob() will throw without normalisation first
  • The webauthnAssertion bytes passed back to Baileys must be the full WebAuthn JSON including authenticatorData, clientDataJSON, signature, and userHandle — sending only authenticatorData + signature causes WhatsApp to silently reject the assertion (it needs clientDataJSON to reconstruct and verify the signed data)
  • allowCredentials: [] means WhatsApp uses discoverable credentials — any passkey registered for the whatsapp.com RP will be accepted

Status

Existing instances connected via QR code are completely unaffected — the signPasskeyAssertion callback only fires when WhatsApp explicitly requests Shortcake.

The Chrome extension requirement is the main operational tradeoff — you need a browser with web.whatsapp.com open on the operator's machine during the linking ceremony. After linking completes the browser can be closed; the session persists normally.

Happy to share more implementation details if useful.

fizizawa avatar Jul 08 '26 06:07 fizizawa

Crie este App simples que pode ajudar a conectar contas já com PassKey na Evolution 2.3.7. Baseado em https://github.com/samucashow15/arqsevo do @samucashow15 https://github.com/gowaplatform/whatskey

RogerioAmaral avatar Jul 08 '26 11:07 RogerioAmaral

Parece que o whatsapp parou de solicitar a passKey. Um numeromeu que estava solicitando, conectou sem passKey.

pontedigital1 avatar Jul 14 '26 12:07 pontedigital1

Parece que o whatsapp parou de solicitar a passKey. Um numeromeu que estava solicitando, conectou sem passKey.

Ontem atualizei a minha EvoGo para versão 0.7.2, instalei a extensão e quando fui conectar, não pediu a passKey. Fiquei em dúvida se funcionou ou se o WhatsApp voltou atrás kkkk

jonathanpog98 avatar Jul 14 '26 13:07 jonathanpog98

alguém confirma se whatsapp parou de solicitar passkey?

MattCarneiro avatar Aug 02 '26 13:08 MattCarneiro

alguém confirma se whatsapp parou de solicitar passkey?

Yes can confirm. My main account does not request passkey anymore even though it did a few weeks ago. Maybe they rolled it back as it's too complicated for most people to configure when using whatsapp web.

peteh avatar Aug 02 '26 20:08 peteh