curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-H 'Profile-Key: PROFILE_KEY' \
-X DELETE https://api.ayrshare.com/api/profiles
const API_KEY = "API_KEY";
const profileKey = "PROFILE_KEY";
fetch("https://api.ayrshare.com/api/profiles", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`,
"Profile-Key": profileKey
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY', 'Profile-Key': 'PROFILE_KEY'}
r = requests.delete('https://api.ayrshare.com/api/profiles',
json=payload,
headers=headers)
print(r.json())
<?php
$url = 'https://api.ayrshare.com/api/profiles';
$apiKey = 'API_KEY'; // Replace with your actual API key
$profileKey = 'PROFILE_KEY'; // Replace with your actual Profile key
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
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.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
using var client = new HttpClient();
var requestUri = "https://api.ayrshare.com/api/profiles";
var bearerToken = "Bearer API_KEY";
var profileKey = "PROFILE_KEY";
using var request = new HttpRequestMessage(HttpMethod.Delete, requestUri);
request.Headers.Add("Authorization", bearerToken);
request.Headers.Add("Profile-Key", profileKey);
try
{
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
{
"status": "success",
"refId": "823nd82nd92jsnn2932"
}
{
"action": "delete",
"status": "error",
"code": 147,
"message": "Error deleting profile."
}
{
"action": "post",
"status": "error",
"code": 144,
"message": "Some profiles not found. Please verify the Profile Keys."
}
Profiles
Xóa User Profile
Xóa một user profile mà bạn là chủ sở hữu.
DELETE
/
profiles
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-H 'Profile-Key: PROFILE_KEY' \
-X DELETE https://api.ayrshare.com/api/profiles
const API_KEY = "API_KEY";
const profileKey = "PROFILE_KEY";
fetch("https://api.ayrshare.com/api/profiles", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`,
"Profile-Key": profileKey
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY', 'Profile-Key': 'PROFILE_KEY'}
r = requests.delete('https://api.ayrshare.com/api/profiles',
json=payload,
headers=headers)
print(r.json())
<?php
$url = 'https://api.ayrshare.com/api/profiles';
$apiKey = 'API_KEY'; // Replace with your actual API key
$profileKey = 'PROFILE_KEY'; // Replace with your actual Profile key
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
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.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
using var client = new HttpClient();
var requestUri = "https://api.ayrshare.com/api/profiles";
var bearerToken = "Bearer API_KEY";
var profileKey = "PROFILE_KEY";
using var request = new HttpRequestMessage(HttpMethod.Delete, requestUri);
request.Headers.Add("Authorization", bearerToken);
request.Headers.Add("Profile-Key", profileKey);
try
{
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
{
"status": "success",
"refId": "823nd82nd92jsnn2932"
}
{
"action": "delete",
"status": "error",
"code": 147,
"message": "Error deleting profile."
}
{
"action": "post",
"status": "error",
"code": 144,
"message": "Some profiles not found. Please verify the Profile Keys."
}
Xóa một user profile mà bạn là chủ sở hữu. Profile Key trong tham số header là User Profile sẽ bị xóa.
Xóa một user profile sẽ loại bỏ vĩnh viễn profile và tất cả các bài đăng liên quan — hành động này
không thể đảo ngược và không thể hoàn tác. Bạn có thể xóa tối đa 8 user profile mỗi giây, vì vậy vui lòng
giãn cách các lệnh gọi API khi thực hiện xóa hàng loạt để tuân thủ giới hạn tốc độ.
Tham số Header
Tham số Body
Tiêu đề của User Profile cần xóa. Phải có nếu
profileKey không được truyền vào. title phân biệt
chữ hoa/thường và phải khớp chính xác với tiêu đề User Profile.curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-H 'Profile-Key: PROFILE_KEY' \
-X DELETE https://api.ayrshare.com/api/profiles
const API_KEY = "API_KEY";
const profileKey = "PROFILE_KEY";
fetch("https://api.ayrshare.com/api/profiles", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`,
"Profile-Key": profileKey
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY', 'Profile-Key': 'PROFILE_KEY'}
r = requests.delete('https://api.ayrshare.com/api/profiles',
json=payload,
headers=headers)
print(r.json())
<?php
$url = 'https://api.ayrshare.com/api/profiles';
$apiKey = 'API_KEY'; // Replace with your actual API key
$profileKey = 'PROFILE_KEY'; // Replace with your actual Profile key
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
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.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
using var client = new HttpClient();
var requestUri = "https://api.ayrshare.com/api/profiles";
var bearerToken = "Bearer API_KEY";
var profileKey = "PROFILE_KEY";
using var request = new HttpRequestMessage(HttpMethod.Delete, requestUri);
request.Headers.Add("Authorization", bearerToken);
request.Headers.Add("Profile-Key", profileKey);
try
{
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
{
"status": "success",
"refId": "823nd82nd92jsnn2932"
}
{
"action": "delete",
"status": "error",
"code": 147,
"message": "Error deleting profile."
}
{
"action": "post",
"status": "error",
"code": 144,
"message": "Some profiles not found. Please verify the Profile Keys."
}
⌘I
