A customer's messages
curl --request GET \
--url https://api.getreply.in/v1/contacts/{phone}/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getreply.in/v1/contacts/{phone}/messages', 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://api.getreply.in/v1/contacts/{phone}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.getreply.in/v1/contacts/{phone}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "<string>",
"direction": "in",
"type": "<string>",
"text": "<string>",
"media_id": "<string>",
"status": "<string>",
"time": "<string>",
"campaign_id": "<string>"
}
],
"next_cursor": "<string>",
"per_page": 123
}Contacts
A customer's messages
One chat, both directions, newest first: your messages (campaigns, replies, templates) and theirs. Never a test.
Permission: Any key (Full, Send only or Read only).
GET
/
v1
/
contacts
/
{phone}
/
messages
A customer's messages
curl --request GET \
--url https://api.getreply.in/v1/contacts/{phone}/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getreply.in/v1/contacts/{phone}/messages', 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://api.getreply.in/v1/contacts/{phone}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.getreply.in/v1/contacts/{phone}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "<string>",
"direction": "in",
"type": "<string>",
"text": "<string>",
"media_id": "<string>",
"status": "<string>",
"time": "<string>",
"campaign_id": "<string>"
}
],
"next_cursor": "<string>",
"per_page": 123
}Authorizations
Your API key, e.g. gr_live_…
Path Parameters
The number with its country code, e.g. +9198250*****, or the WhatsApp username id.
Query Parameters
How many on a page (at most 100).
Required range:
1 <= x <= 100next_cursor from the page before. Leave out for the first page.