---
title: "Socket.IO: Send text (WPP)"
description: "Fire a text message through the WPP engine without opening an HTTP request per send."
lang: en
canonical: https://doc.apibrasil.io/socket-io/send-text-wpp
markdown: https://doc.apibrasil.io/socket-io/send-text-wpp.md
source: apibrasil-documentation
---

# Socket.IO: Send text (WPP)

> Fire a text message through the WPP engine without opening an HTTP request per send.

- **Address:** `https://socket.apibrasil.com.br`

**Parameters of this connection**

- `bearer` (required): The same Bearer Token you use on the API. It is the only parameter checked at the door: without it the connection is refused with “Token de autenticação não fornecido”, and with a token that does not validate, with “Token de autenticação inválido”.
- `channelName` (required): The room you join. It is how the service decides what to deliver to you, and it is your Profile ID — the same value the gateway uses when publishing. Without it the connection COMES UP but you join no room at all: no event arrives, and no error is shown.
- `deviceToken` (optional): It filters nothing and does not affect what you receive. It is stored and only read when you emit `send`, to become the `DeviceToken` header of the call to the gateway. Required only if you are going to send through an API that requires a device.
- `action` (optional): The API path that `send` will call — `whatsapp/sendText`, for example. It is fixed for the connection: to send through two different APIs, open two connections. Without it, `send` returns `{ error: “URL não fornecida” }` on `receive`.

**What to listen to**

- `receive` — The response to what you sent

**What the send calls:** `whatsapp/sendText` — Text over WhatsApp (WPP) (WPPConnect, requires DeviceToken)

A plain text message through the WPP engine.

```json
{
  "number": "5531999999999",
  "text": "Your delivery is on its way to the registered address.",
  "time_typing": 0,
  "options": {
    "createChat": true
  }
}
```

The details of each parameter, of the frames and of the pitfalls are on the general Socket.IO page. [Socket.IO](https://doc.apibrasil.io/socket-io.md)

## See also

- Documentation index: https://doc.apibrasil.io/llms.txt
- HTML version of this page: https://doc.apibrasil.io/socket-io/send-text-wpp
