W-api icon

W-api

Interaja com W-api WhatsApp API

Instância → Logout

AI-generated

Summary

Logs out a W-api WhatsApp instance by name, ending its WhatsApp session. It sends a DELETE request to the W-api server and returns the server's response.

Inputs

  • instanceName (required) — Unique name of the instance to log out (for example, minha-loja). It is inserted into the request URL path.

Output shape

One output item per input item. Its json field holds the parsed JSON response from the W-api logout endpoint.

The response body comes from the W-api server and its fields aren't defined in the node. The node uses the base URL and API key from the wapiApi credentials. If an item fails and Continue On Fail is enabled, that item's json is { error: message }. Otherwise the node throws.

Examples

Example 1: Disconnect a store's WhatsApp session after a support workflow finishes.

Resource: Instância, Operation: Logout, Nome da Instância: minha-loja

Example 2: Log out several instances in one run by feeding a list of names.

Resource: Instância, Operation: Logout, Nome da Instância: expression {{ $json.instance }}, Continue On Fail enabled

Links

Discussion