Podrás obtener todos los valores de retorno de Whatsapp. Como estado de conexión, Mensajes entrantes, Mensajes salientes, Desconexión , Estado de batería,...
https://easyhermes.com/api/setwebhook.php?webhook_url=https://webhook.site/1b25464d6833784f96eef4xxxxxxxxxx&enable=true&instance_id={INSTANCE_ID}&access_token={YOUR_ACCESS_TOKEN}
webhook_url{https://webhook.site/1b25464d6833784f96eef4xxxxxxxxxx}enabletrueinstance_id{INSTANCE_ID}access_token{YOUR_ACCESS_TOKEN}
Vea algunos ejemplos de código para integrar su API.
<?php$curl = curl_init();$access_token = '{YOUR_ACCESS_TOKEN}';$instance_id = '{INSTANCE_ID}';$webhook_url = '{WEBHOOK_URL}';$enable = true;curl_setopt_array($curl, array( CURLOPT_URL => 'https://easyhermes.com/api/setwebhook.php?access_token=' . $access_token . '&instance_id=' . $instance_id . '&webhook_url=' . $webhook_url . '&enable=' . $enable, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST',));$response = curl_exec($curl);curl_close($curl);echo $response;{"status":"success","message":"Webhook URI Saved"}