LetsBot মেনু
শুরু করুন বাংলা ভাষা

Meta Business Partner যুক্তরাজ্যে নিবন্ধিত কোম্পানি

ভাষা

Live Chat · API এন্ডপয়েন্ট

GET /api/v1/live_chat/contact

Get contact

Get a contact with its labels and assigned team members.

Get a contact with its labels and assigned team members. If the phone number is not a contact yet, it is created.

Required: phone.

Response: data = {id, phone, labels[], moderators[]}, plus whatsapp_bsuid, whatsapp_username and phone_available where WhatsApp usernames are on (see below).

WhatsApp usernames (only for workspaces with WhatsApp username support switched on; absent otherwise). phone keeps its meaning.

  • whatsapp_bsuid — Meta's ID for a customer who hides their number behind a WhatsApp username, e.g. EG.2288384708632117. Not a phone number; null when Meta sent none.
  • whatsapp_username — the customer's WhatsApp @username, without the @. Display only; null when none.
  • phone_available — false when the customer keeps their number private: do not SMS, call or store phone as a number.

Validation errors return HTTP 422 {"message": "error", "data": "<first error>"}.

কোয়েরি প্যারামিটার

প্যারামিটারআবশ্যকউদাহরণবিবরণ
phone হ্যাঁ {{phone}} Contact phone number

উদাহরণ অনুরোধ

curl -G "https://letsbot.net/api/v1/live_chat/contact" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/live_chat/contact?phone=%7B%7Bphone%7D%7D", {
  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/live_chat/contact?phone=%7B%7Bphone%7D%7D');

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/live_chat/contact",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    params={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

উত্তর

Contact200
{
  "data": {
    "id": 42,
    "phone": "966500000000",
    "labels": [
      {
        "id": 5,
        "name": "VIP",
        "name_translations": {
          "en": "VIP"
        },
        "color": "#6D28D9",
        "status": null
      }
    ],
    "moderators": [
      {
        "id": 3,
        "name": "Sara Ahmed",
        "email": "sara@example.com",
        "phone": "966511111111",
        "is_ai_agent": false
      }
    ],
    "whatsapp_bsuid": null,
    "whatsapp_username": "ahmed_store",
    "phone_available": true
  }
}

আপনি প্রস্তুত হলেই আমরা প্রস্তুত

এই এন্ডপয়েন্টটি নিজের নম্বরে চেষ্টা করুন

ফ্রি ট্রায়ালের সময়ই API কাজ করে। একটি অ্যাকাউন্ট তৈরি করুন, আপনার WhatsApp নম্বর যুক্ত করুন এবং API → প্রমাণীকরণ ডেটা থেকে আপনার কী কপি করুন।