npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wppapi-sdk

v0.2.0

Published

SDK JavaScript oficial da WPPAPI — API WhatsApp multi-tenant (envio de texto e mídia, status, webhooks). Zero dependências, browser e Node 18+.

Readme

WPPAPI — SDK JavaScript

SDK oficial da WPPAPI — API WhatsApp multi-tenant, gerenciada e dev-friendly. Envie e receba mensagens de WhatsApp via REST, com webhooks assinados (HMAC), integração nativa com Chatwoot e painel self-service.

  • Zero dependências — usa fetch nativo (browser e Node 18+)
  • Trial de 3 dias grátis, sem cartão → criar conta
  • Base da API: https://api.wpp-api.com

Instalação

npm install github:iproute-tecnologia/wppapi-sdk-js

Ou copie o index.js — é um arquivo único, sem dependências.

Uso

import { WppApiClient } from "wppapi-sdk";

const client = new WppApiClient({
  baseUrl: "https://api.wpp-api.com",
  instanceId: "sua-instancia",
  token: "seu-token",
});

// Texto
await client.sendText("5511999999999", "Olá! 👋");

// Imagem por URL, com legenda
await client.sendImage("5511999999999", "https://exemplo.com/foto.jpg", "Olha isso");

// Documento em base64
await client.sendFile("5511999999999", {
  data: "<base64 sem prefixo data:>",
  mimetype: "application/pdf",
  filename: "proposta.pdf",
});

// Validar número antes de enviar
const { exists } = await client.checkNumber("5511999999999");

// Sessão
await client.status();   // conectada? pareando?
await client.qrCode();   // QR para parear
await client.me();       // perfil conectado

Token no header (em vez da URL)

Para ambientes onde URLs vão para logs, envie o token via header Client-Token:

const client = new WppApiClient({
  baseUrl: "https://api.wpp-api.com",
  instanceId: "sua-instancia",
  token: "seu-token",
  clientTokenHeader: true,
});

Métodos

| Método | Endpoint | |--------|----------| | status() | GET /status | | qrCode() | GET /qr-code | | me() | GET /me | | sendText(phone, message) | POST /send-text | | sendImage(phone, image, caption?) | POST /send-image | | sendFile(phone, file, caption?) | POST /send-file | | sendVoice(phone, audio) | POST /send-voice | | sendVideo(phone, video, caption?) | POST /send-video | | checkNumber(phone) | GET /check-number | | chats(limit?) | GET /chats | | groups() | GET /groups |

A API completa (location, contact, reply, reaction, typing, seen, sticker, poll, list, status/stories, edit, pin) está documentada em wpp-api.com/docs e no Swagger do painel.

Recebendo mensagens (webhooks)

Cadastre uma URL de webhook no painel e receba eventos assinados com HMAC-SHA256 (X-WPPAPI-Signature). Exemplo completo de receptor em Node.js com validação de assinatura: guia de webhooks.

// Payload de mensagem recebida
{
  "event": "received",
  "instanceId": "sua-instancia",
  "timestamp": "2026-07-23T15:00:00.000Z",
  "data": { "from": "5511999999999", "body": "oi", "type": "chat", "fromMe": false }
}

Guias

Licença

MIT © IPRoute Tecnologia