curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-H 'Profile-Key: PROFILE_KEY' \
-d '{"platform": "twitter"}' \
-X DELETE https://api.ayrshare.com/api/profiles/social
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/profiles/social", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`,
"Profile-Key": PROFILE_KEY
},
body: JSON.stringify({ platform: "twitter" }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'platform': 'twitter' }
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY',
'Profile-Key': PROFILE_KEY }
r = requests.delete('https://api.ayrshare.com/api/profiles/social',
json=payload,
headers=headers)
print(r.json())
<?php
$url = 'https://api.ayrshare.com/api/profiles/social';
$apiKey = 'API_KEY'; // Replace with your actual API key
$profileKey = 'PROFILE_KEY'; // Replace with your actual Profile key
$data = ['platform' => 'twitter']; // Data to be sent
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
'Profile-Key: ' . $profileKey
],
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace UnlinkSocialPOSTRequest_csharp
{
class UnlinkSocial
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string PROFILE_KEY = "PROFILE_KEY"; // Make sure this is defined
string url = "https://api.ayrshare.com/api/profiles/social";
string json = "{\"platform\": \"twitter\"}";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
client.DefaultRequestHeaders.Add("Profile-Key", PROFILE_KEY);
try
{
var content = new StringContent(json, Encoding.UTF8, "application/json");
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri(url),
Content = content
};
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
}
{
"status": "success",
"platform": "twitter",
"refId": "13a9wa9e0df1183b7a6a1fc2c61b8023fa9a32a1"
}
{
"action": "post",
"status": "error",
"code": 163,
"message": "Missing, empty, or not valid platforms parameter. Please verify sending an array of valid platforms. .../ayrshare.com/rest-api/endpoints/post"
}
Profiles
إلغاء ربط شبكة تواصل اجتماعي
إلغاء ربط شبكة تواصل اجتماعي لملف تعريف مستخدم معين.
DELETE
/
profiles
/
social
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-H 'Profile-Key: PROFILE_KEY' \
-d '{"platform": "twitter"}' \
-X DELETE https://api.ayrshare.com/api/profiles/social
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/profiles/social", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`,
"Profile-Key": PROFILE_KEY
},
body: JSON.stringify({ platform: "twitter" }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'platform': 'twitter' }
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY',
'Profile-Key': PROFILE_KEY }
r = requests.delete('https://api.ayrshare.com/api/profiles/social',
json=payload,
headers=headers)
print(r.json())
<?php
$url = 'https://api.ayrshare.com/api/profiles/social';
$apiKey = 'API_KEY'; // Replace with your actual API key
$profileKey = 'PROFILE_KEY'; // Replace with your actual Profile key
$data = ['platform' => 'twitter']; // Data to be sent
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
'Profile-Key: ' . $profileKey
],
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace UnlinkSocialPOSTRequest_csharp
{
class UnlinkSocial
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string PROFILE_KEY = "PROFILE_KEY"; // Make sure this is defined
string url = "https://api.ayrshare.com/api/profiles/social";
string json = "{\"platform\": \"twitter\"}";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
client.DefaultRequestHeaders.Add("Profile-Key", PROFILE_KEY);
try
{
var content = new StringContent(json, Encoding.UTF8, "application/json");
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri(url),
Content = content
};
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
}
{
"status": "success",
"platform": "twitter",
"refId": "13a9wa9e0df1183b7a6a1fc2c61b8023fa9a32a1"
}
{
"action": "post",
"status": "error",
"code": 163,
"message": "Missing, empty, or not valid platforms parameter. Please verify sending an array of valid platforms. .../ayrshare.com/rest-api/endpoints/post"
}
إلغاء ربط شبكة تواصل اجتماعي لملف تعريف مستخدم معين. على سبيل المثال، إذا كان ملف تعريف مستخدم مرتبطًا بـ TikTok، فقم بإلغاء ربط TikTok من خلال إجراء طلب نقطة النهاية هذه. ستُعاد استجابة 200 ناجحة حتى إذا كانت المنصة غير مرتبطة. إذا لم يتم توفير
Profile-Key، فسيتم إلغاء ربط الحساب الاجتماعي لملف التعريف الأساسي (Primary Profile).
معلمات الترويسة
معلمات الجسم
المنصات المسموح بإلغاء ربطها:
bluesky وfacebook وgmb وinstagram وlinkedin وreddit وtelegram وthreads وtiktok وtwitter وyoutube.curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-H 'Profile-Key: PROFILE_KEY' \
-d '{"platform": "twitter"}' \
-X DELETE https://api.ayrshare.com/api/profiles/social
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/profiles/social", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`,
"Profile-Key": PROFILE_KEY
},
body: JSON.stringify({ platform: "twitter" }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'platform': 'twitter' }
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY',
'Profile-Key': PROFILE_KEY }
r = requests.delete('https://api.ayrshare.com/api/profiles/social',
json=payload,
headers=headers)
print(r.json())
<?php
$url = 'https://api.ayrshare.com/api/profiles/social';
$apiKey = 'API_KEY'; // Replace with your actual API key
$profileKey = 'PROFILE_KEY'; // Replace with your actual Profile key
$data = ['platform' => 'twitter']; // Data to be sent
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
'Profile-Key: ' . $profileKey
],
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace UnlinkSocialPOSTRequest_csharp
{
class UnlinkSocial
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string PROFILE_KEY = "PROFILE_KEY"; // Make sure this is defined
string url = "https://api.ayrshare.com/api/profiles/social";
string json = "{\"platform\": \"twitter\"}";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
client.DefaultRequestHeaders.Add("Profile-Key", PROFILE_KEY);
try
{
var content = new StringContent(json, Encoding.UTF8, "application/json");
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri(url),
Content = content
};
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
}
{
"status": "success",
"platform": "twitter",
"refId": "13a9wa9e0df1183b7a6a1fc2c61b8023fa9a32a1"
}
{
"action": "post",
"status": "error",
"code": 163,
"message": "Missing, empty, or not valid platforms parameter. Please verify sending an array of valid platforms. .../ayrshare.com/rest-api/endpoints/post"
}
⌘I
