API Disconnect Device

This API will disconnect connected device.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.fonnte.com/disconnect',
  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',
  CURLOPT_HTTPHEADER => array(
    'Authorization: TOKEN'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

If you prefer to see on postman, see here.

TOKEN must be filled by your own token. See how to get token.

Response

Successfull response

{
    "detail": "device disconnected",
    "status": true
}

- Token invalid : token is not valid

{
    "detail": "token invalid",
    "status": false
}

- Device already disconnected : the device is disconnected already

{
    "detail": "device already disconnected",
    "status": false
}

Related knowledge

See more
Made with in Indonesia