Hapus Blacklist ChatGPT
API untuk menghapus nomor dari blacklist ChatGPT. Nomor dikirim sebagai path parameter. ChatGPT otomatis dideteksi dari device yang terhubung (device key di header).
HTTP REQUEST
DELETE https://api.starsender.online/api/chat-gpt/blacklist/{number}
Header Parameters
| Parameter | Default | Description |
|---|---|---|
| Authorization | true | Device API key (sama seperti API Send), bisa didapat di menu Device -> Detail -> Device Key |
Path Parameters
| Parameter | Default | Description |
|---|---|---|
| number | true | Nomor WhatsApp yang akan dihapus dari blacklist (contoh: 08123456789 atau 6281234567890) |
Catatan
- Device harus sudah di-link ke ChatGPT. Jika belum, API mengembalikan "No ChatGPT linked to this device".
- Nomor akan dinormalisasi (format internasional) sebelum dihapus.
Implementasi dengan PHP
hapus_blacklist.php
<?php
$curl = curl_init();
$number = "08123456789"; // atau 6281234567890
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.starsender.online/api/chat-gpt/blacklist/' . urlencode($number),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
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": {},
"message": "Success to delete blacklist"
}