Viber 2 Way message status
Example of request to receive Viber 2 Way message status. Viber 2 Way service is designed to get feedback on a message from a consumer.
URI: https://api.interconnect.solutions/api/json.php
All requests to API are sent in JSON format using the POST method.
Header parameters
Requests must contain header Content-Type: application/json, otherwise, the request will be considered invalid even if it has valid JSON.
Request example
- JSON
- cURL
- PHP
- Python
- Node.js
{
"auth": "bb56a4369eb19***cfec6d1776bd25",
"data": [
{
"type": "status",
"id": 100500
}
]
}
curl -X POST 'https://api.interconnect.solutions/api/json.php' \
-H 'Content-Type: application/json' \
--data-raw '{
"auth": "bb56a4369eb19***cfec6d1776bd25",
"data": [
{
"type": "status",
"id": 100500
}
]
}'
<?php
$payload = json_encode([
'auth' => 'bb56a4369eb19***cfec6d1776bd25',
'data' => [
[
'type' => 'status',
'id' => 100500,
],
],
], JSON_UNESCAPED_UNICODE);
$ch = curl_init('https://api.interconnect.solutions/api/json.php');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
payload = {
"auth": "bb56a4369eb19***cfec6d1776bd25",
"data": [
{
"type": "status",
"id": 100500,
},
],
}
response = requests.post(
"https://api.interconnect.solutions/api/json.php",
json=payload,
timeout=30,
)
print(response.json())
const payload = {
"auth": "bb56a4369eb19***cfec6d1776bd25",
"data": [
{
"type": "status",
"id": 100500
}
]
};
const response = await fetch("https://api.interconnect.solutions/api/json.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
console.log(await response.json());
Response parameters
Response examples
- Successful
- Access denied
HTTP Status Code: 200
Content Type: JSON application/json
{
"success": true,
"data": [
{
"success": true,
"data": {
"id":10500,
"type": "viber",
"status": "REPLIED",
"replies": [
{
"datetime": "2022-05-01T12:01:02+03:00",
"message": "Please wait"
},
{
"datetime": "2022-05-03T14:21:17+03:00",
"media": {
"url": "https://url.com/home/vibermedia/",
"filename": "invoice.pdf",
"filesize": 67983
}
},
{
"datetime": "2022-05-03T14:21:17+03:00",
"message": "Correct invoice",
"media": {
"url": "https://url.com/home/vibermedia/",
"filename": "invoice.pdf",
"filesize": 68934
}
}
]
}
}
]
}
HTTP Status Code: 200
Content Type: JSON application/json
{
"success": false,
"error": "Access denied"
}