curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook
const url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
const response = await fetch(url, {
headers: {
'Authorization': 'Bearer API_KEY'
}
});
import requests
url = 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook'
headers = {'Authorization': 'Bearer API_KEY'}
response = requests.get(url, headers=headers)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer API_KEY'));
$response = curl_exec($ch);
curl_close($ch);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HistorySocialIdGETRequest_csharp
{
class HistorySocialId
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook", nil)
req.Header.Add("Authorization", "Bearer API_KEY")
resp, err := client.Do(req)
require 'net/http'
require 'uri'
uri = URI.parse("https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook")
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
[
{
"commentsCount": 0,
"created": "2024-01-25T23:01:23Z",
"from": {
"name": "Ayrshare",
"id": "18930271191"
},
"id": "18930271191_39392923",
"mediaUrls": [
{
"media": {
"image": {
"height": 720,
"src": "https://scontent-lga3-2.xx.fbcdn.net/v/...",
"width": 405
},
"source": "https://video-lga3-2.xx.fbcdn.net/o1/..."
},
"title": "🔥 Sneaker time!"
}
],
"messageTags": [
{
"id": "434786466522",
"name": "#sneakerswap365",
"offset": 242,
"length": 15
}
],
"post": "🔥 Sneaker Time for all!",
"postUrl": "https://www.facebook.com/reel/72681340799/",
"lastUpdated": "2024-01-25T23:29:58.014Z",
"nextUpdate": "2024-01-25T23:40:58.014Z"
}
]
{
"action": "get",
"status": "error",
"code": 221,
"message": "The ID was not found. Please verify the id, API or Profile Keys, and required parameters.",
"id": "7268134079",
"lastUpdated": "2024-01-25T23:45:14.311Z",
"nextUpdate": "2024-01-25T23:56:14.311Z"
}
History
Historique des publications par ID social
Récupérez l’historique d’une publication qui n’a pas été créée via Ayrshare.
GET
/
history
/
:socialId
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook
const url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
const response = await fetch(url, {
headers: {
'Authorization': 'Bearer API_KEY'
}
});
import requests
url = 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook'
headers = {'Authorization': 'Bearer API_KEY'}
response = requests.get(url, headers=headers)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer API_KEY'));
$response = curl_exec($ch);
curl_close($ch);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HistorySocialIdGETRequest_csharp
{
class HistorySocialId
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook", nil)
req.Header.Add("Authorization", "Bearer API_KEY")
resp, err := client.Do(req)
require 'net/http'
require 'uri'
uri = URI.parse("https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook")
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
[
{
"commentsCount": 0,
"created": "2024-01-25T23:01:23Z",
"from": {
"name": "Ayrshare",
"id": "18930271191"
},
"id": "18930271191_39392923",
"mediaUrls": [
{
"media": {
"image": {
"height": 720,
"src": "https://scontent-lga3-2.xx.fbcdn.net/v/...",
"width": 405
},
"source": "https://video-lga3-2.xx.fbcdn.net/o1/..."
},
"title": "🔥 Sneaker time!"
}
],
"messageTags": [
{
"id": "434786466522",
"name": "#sneakerswap365",
"offset": 242,
"length": 15
}
],
"post": "🔥 Sneaker Time for all!",
"postUrl": "https://www.facebook.com/reel/72681340799/",
"lastUpdated": "2024-01-25T23:29:58.014Z",
"nextUpdate": "2024-01-25T23:40:58.014Z"
}
]
{
"action": "get",
"status": "error",
"code": 221,
"message": "The ID was not found. Please verify the id, API or Profile Keys, and required parameters.",
"id": "7268134079",
"lastUpdated": "2024-01-25T23:45:14.311Z",
"nextUpdate": "2024-01-25T23:56:14.311Z"
}
Récupérez l’historique des publications qui n’ont pas été créées via Ayrshare en fournissant l’ID de publication sociale de bas niveau. Cet ID de publication sociale est renvoyé dans le champ
postIds du point de terminaison post ou dans le champ id du point de terminaison get all history ou l’ID d’une URL de publication, comme celle de cette publication Facebook.
Le compte lié doit être le propriétaire de la publication pour en récupérer l’historique.
Plateformes prises en charge : Facebook, Instagram, LinkedIn, Threads, TikTok, Twitter et YouTube avec les valeurs platform suivantes : facebook, instagram, linkedin, threads, tiktok, twitter, youtube.
Paramètres d’en-tête
Paramètres de chemin
L’ID de publication sociale de la publication.
Veuillez consulter le point de terminaison /post Réponse 200 pour un autre exemple de l’ID de publication sociale
Facebook
104923907983682_108329000309742Paramètres de requête
Toujours égal à
trueValeurs :
facebook, instagram, linkedin, threads, tiktok, twitter, youtubecurl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook
const url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
const response = await fetch(url, {
headers: {
'Authorization': 'Bearer API_KEY'
}
});
import requests
url = 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook'
headers = {'Authorization': 'Bearer API_KEY'}
response = requests.get(url, headers=headers)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer API_KEY'));
$response = curl_exec($ch);
curl_close($ch);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HistorySocialIdGETRequest_csharp
{
class HistorySocialId
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook", nil)
req.Header.Add("Authorization", "Bearer API_KEY")
resp, err := client.Do(req)
require 'net/http'
require 'uri'
uri = URI.parse("https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook")
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
[
{
"commentsCount": 0,
"created": "2024-01-25T23:01:23Z",
"from": {
"name": "Ayrshare",
"id": "18930271191"
},
"id": "18930271191_39392923",
"mediaUrls": [
{
"media": {
"image": {
"height": 720,
"src": "https://scontent-lga3-2.xx.fbcdn.net/v/...",
"width": 405
},
"source": "https://video-lga3-2.xx.fbcdn.net/o1/..."
},
"title": "🔥 Sneaker time!"
}
],
"messageTags": [
{
"id": "434786466522",
"name": "#sneakerswap365",
"offset": 242,
"length": 15
}
],
"post": "🔥 Sneaker Time for all!",
"postUrl": "https://www.facebook.com/reel/72681340799/",
"lastUpdated": "2024-01-25T23:29:58.014Z",
"nextUpdate": "2024-01-25T23:40:58.014Z"
}
]
{
"action": "get",
"status": "error",
"code": 221,
"message": "The ID was not found. Please verify the id, API or Profile Keys, and required parameters.",
"id": "7268134079",
"lastUpdated": "2024-01-25T23:45:14.311Z",
"nextUpdate": "2024-01-25T23:56:14.311Z"
}
⌘I
