API Get Devices

This API is used to get all devices information on an account.

<?php

$curl = curl_init();

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

The token is not device token! but account token.

If you prefer to see on postman, see here.

Response

Successfull response

{
    "connected": 0,
    "data": [
        {
            "autoread": "off",
            "device": "6287866250310",
            "expired": "1707782400",
            "name": "tutorial",
            "package": "Free",
            "quota": "1000",
            "status": "disconnect",
            "token": "sUqjkKH+UG+@3SmnKrhz"
        }
    ],
    "devices": 1,
    "messages": 0,
    "status": true,
    "type": "device"
}

Info :

  • connected : how much is your connected device.
  • data : each data represent your device data including :
    • autoread : autoread status
    • device : device number
    • expired : device expiration unix timestamp
    • name : device name
    • package : device package
    • quota : device's quota to send message
    • status : device status whether is connect or disconect
    • token : device token
  • devices : total devices int this account
  • messages : total messages requested in this account
  • type : account type

- unknown user : your account token is invalid

{
    "reason": "unknown user",
    "status": false
}

Related knowledge

See more
Made with in Indonesia