ChatBot API Schnittstelle

Code-Beispiele

Get existing chat

/getExistingChat (Swagger)

Ihre letzte Absender-ID :

								 
<?php
$botIdentifier = YOUR_BOT_IDENTIFIER;
$clientId = YOUR_CLIENT_ID;
$url = "https://bot.chatbot4you.de/restApi/cb4you/action/getExistingChat?botIdentifier=".$botIdentifier;
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_POST => 1,
    CURLOPT_URL => $url,
    CURLOPT_POSTFIELDS => [
        "senderId" => $clientId,
        "currentHref" => YOUR_CURRENT_PAGE_URL
    ],
    CURLOPT_SSL_VERIFYPEER => false
]);
$response = curl_exec($curl);
curl_close($curl);
?>