LetsBot 菜单
立即开始 简体中文 语言

Meta 商业合作伙伴 英国注册公司

语言

Chat · API 端点

GET /api/v1/chat/list

Get chat list for phone

List conversations, most recent first.

List conversations, most recent first.

Official WhatsApp Cloud API numbers: served from your LetsBot workspace — every conversation with at least one message, newest last_message_date first, with cursor pagination (limit, cursor, next_cursor). Each item: id (chat id), contact_id, phone, name, platform, is_group, is_archived, is_pinned, last_message_date (ISO-8601, UTC).

QR (WhatsApp Web) numbers: unchanged — the chats of the WhatsApp session.

To read the messages themselves use Message Archive → Get messages by date (phone narrows it to one conversation).

查询参数

参数必填示例说明
platform 否 all Optional, official numbers only. Same as on `contacts`: default is the platform of the channel whose key you use; `all` for every platform.
limit 否 50 Optional, official numbers only. Page size, default 50, maximum 200.
cursor 否 Optional, official numbers only. Pass `next_cursor` from the previous response, unchanged.

请求示例

curl -G "https://letsbot.net/api/v1/chat/list" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/chat/list", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/list');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_LB_API_KEY',
        'Accept: application/json',
    ],
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "GET",
    "https://letsbot.net/api/v1/chat/list",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

响应

200 — official number200
{
    "success": true,
    "Status": true,
    "source": "archive",
    "channel": {
        "id": 2,
        "global_id": "8f0c2a4e-5b1d-4c3a-9e7f-0a1b2c3d4e5f",
        "phone": "966500000000",
        "platform": "whatsapp",
        "is_official": true
    },
    "data": [
        {
            "id": "966512345678@s.whatsapp.net",
            "contact_id": 184,
            "phone": "966512345678",
            "name": "Karim Store",
            "platform": "whatsapp",
            "is_group": false,
            "is_archived": false,
            "is_pinned": false,
            "last_message_date": "2026-09-29T09:14:02+00:00"
        }
    ],
    "next_cursor": null
}

随时为你准备就绪

用您自己的号码试用此端点

API 在免费试用期间即可使用。创建账户,连接您的 WhatsApp 号码,然后在 API → 认证数据 中复制您的密钥。