API Device Profile

This API used to get information about your device

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.fonnte.com/device',
  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.

Result :

{
    "device": "6282227097005",
    "device_status": "connect",
    "expired": "18 November 2029",
    "messages": 16785,
    "name": "Fonnte admin",
    "package": "Reguler",
    "quota": "78",
    "status": true
}

Available JSON output

  • device - device number
  • device_status - connect or disconnect
  • expired - when will this device expired
  • messages - total messages requested
  • name - device name
  • package- package name
  • quota - device's quota for sending message
  • status - true

if somehow token is not correct, response status will be false

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

Related knowledge

See more
Made with in Indonesia