List Device
API untuk mengambil list device.
HTTP REQUEST
GET https://api.starsender.online/api/devices
Header Parameters
| Parameter | Default | Description |
|---|---|---|
| Authorization | true | Account API key, anda bisa dapatkan di menu profile |
Query Parameters
| Parameter | Default | Description |
|---|
Implementasi dengan PHP
device.php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.starsender.online/api/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 => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type:application/json',
'Authorization: YOUR API KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Respon API
{
"success": true,
"data": {},
"message": "Success to get devices"
}