List Blacklist ChatGPT
API untuk mengambil daftar blacklist ChatGPT. ChatGPT otomatis dideteksi dari device yang terhubung (device key di header).
HTTP REQUEST
GET https://api.starsender.online/api/chat-gpt/blacklist
Header Parameters
| Parameter | Default | Description |
|---|---|---|
| Authorization | true | Device API key (sama seperti API Send), bisa didapat di menu Device -> Detail -> Device Key |
Query Parameters
| Parameter | Default | Description |
|---|---|---|
| limit | 10 | Jumlah data per halaman |
| page | 1 | Nomor halaman |
Catatan
- Device harus sudah di-link ke ChatGPT (melalui Chat GPT Device). Jika belum, API mengembalikan "No ChatGPT linked to this device".
Implementasi dengan PHP
list_blacklist.php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.starsender.online/api/chat-gpt/blacklist?limit=10&page=1',
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_DEVICE_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Respon API
{
"success": true,
"data": {
"blacklist": [
{
"id": 1,
"chat_gpt_id": 1,
"number": "6281234567890",
"user_id": 1,
"created_at": 1234567890000,
"updated_at": 1234567890000
}
],
"total_records": 1
},
"message": "Success to get blacklist"
}