The endpoint for deleting realtime subscriptions seems to have stopped working. I'm performing a cURL 'POST' with a 'DELETE' custom request and receiving the following JSON response from Instagram:
{"meta":{"code":200},"data":null}
However, the subscription is not deleted. My count of active subscriptions will never decrease, and I cannot subscribe to new object types.
Is anyone else having this issue? Here's my implementation in PHP (working fine for months, until a few days ago):
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, "https://api.instagram.com/v1/subscriptions? client_secret=$client_secret&client_id=$client_id");
curl_setopt($curl, CURLOPT_POST, false);
$resp = curl_exec($curl);
// Parse JSON \
$json = json_decode($resp);
foreach ($json->data as $subscription)
{
echo "DELETING:\r\n";
echo "object:\t$subscription->object\r\n";
echo "object_id:\t$subscription->object_id\r\n";
echo "aspect:\t$subscription->aspect\r\n";
echo "callback URL:\t$subscription->callback_url\r\n";
echo "type:\t$subscription->type\r\n";
echo "id:\t$subscription->id\r\n\r\n";
curl_setopt($curl, CURLOPT_URL, "https://api.instagram.com/v1/subscriptions?client_secret=$client_secret&client_id=$client_id&id=$subscription->object_id");
curl_setopt($curl, CURLOPT_POST, false);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
$resp = curl_exec($curl);
echo $resp."\r\n";
}