Skip to main content
GET
/
whatsapp
/
get
/
conversation
Get Conversation
curl --request GET \
  --url https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation
import requests

url = "https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "status": "1",
  "data": [
    {
      "message": "Hi",
      "type": "text",
      "direction": "incoming"
    }
  ],
  "message": "Success."
}
Returns the conversation history for a specific subscriber.

Pagination

offset skips that many messages before it starts returning results. Say the conversation has 30 messages and you set limit=10:
CalloffsetWhat you get back
1st call0The most recent 10 messages
2nd call10The next 10 older messages — the first 10 are skipped, not returned again
3rd call20The next 10 after that
Each time, add limit to the previous offset to keep paging through older messages.

Query Parameters

apiToken
string
required

Your ChatSyncs API key (not a WhatsApp/Meta access token). Where to find it.

Example:

"API-KEY"

phone_number_id
string
required

The WhatsApp account's phone number ID. Where to find it.

Example:

"PHONE-NUMBER-ID"

phone_number
string
required

The subscriber's phone number, with country code, digits only.

Example:

"PHONE-NUMBER"

limit
number
required

How many conversation messages to fetch.

Example:

10

offset
number

Pagination offset.

Example:

1

Response

200 - application/json

Standard ChatSyncs response. status is "1" on success and "0" on failure.

status
string

"1" = success, "0" = failure.

message
string

Human-readable result message.