Skip to content

Channel & nomor HP

List channel yang terhubung dan cek status nomor HP pakai @wazapin/sdk.

Updated View as Markdown

Cari channel_id kamu buat ngirim pesan, cek kesehatan koneksi, dan troubleshoot nomor WhatsApp yang terhubung pakai wazapin.channels.

List channel

const { data } = await wazapin.channels.list({ limit: 20 });

for (const channel of data.items) {
  console.log(channel.id);
}

Iterasi semua channel

for await (const channel of wazapin.channels.listPaginated({ limit: 50 })) {
  console.log(channel.id);
}

Ambil satu channel

const channel = await wazapin.channels.get("wzp_ch_123");

Cek status channel

const status = await wazapin.channels.status("wzp_ch_123");

Helper setup

SDK juga sediain helper setup channel buat workspace yang butuh:

await wazapin.channels.connect("wzp_ch_123");
const qr = await wazapin.channels.getQr("wzp_ch_123");
const health = await wazapin.channels.phoneHealth("wzp_ch_123");
Navigation

Type to search…

↑↓ navigate↵ selectEsc close