Remove Accounts
You cannot remove ad accounts from your business if you're OWNER and if the accounts are CONFIRMED. If you have a PENDING access request or you have AGENCY access to the ad account, you can make this DELETE call:
DELETE https://us-central1-appgregator.cloudfunctions.net/facebook/adaccounts/remove-accounts/
Query Parameters
Name
Type
Description
name*
String
ft-4
connection_name*
String
fbads-01
business_id*
String
404745734937629
Headers
Name
Type
Description
x-api-key*
String
U2Fsd...
{
"error": {
"message": "Unsupported delete request. Object with ID '4047457349376293' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "ArLO_mgVAjzTdD9JbxIDuxm"
}
}curl --location --request DELETE 'https://us-central1-appgregator.cloudfunctions.net/facebook/adaccounts/remove-accounts?name=ft-4&connection_name=fbads-01&business_id=4047457349376293' \
--header 'x-api-key: U2Fsd...'var axios = require('axios');
var config = {
method: 'delete',
url: 'https://us-central1-appgregator.cloudfunctions.net/facebook/adaccounts/remove-accounts?name=ft-4&connection_name=fbads-01&business_id=4047457349376293',
headers: {
'x-api-key': 'U2Fsd...'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/facebook/adaccounts/remove-accounts?name=ft-4&connection_name=fbads-01&business_id=4047457349376293',
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(
'x-api-key: U2Fsd...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Last updated