سرد Webhooks المسجلة
curl --request GET \
--url https://api.ayrshare.com/api/hook/webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ayrshare.com/api/hook/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ayrshare.com/api/hook/webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ayrshare.com/api/hook/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ayrshare.com/api/hook/webhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ayrshare.com/api/hook/webhook")
.header("Authorization", "Bearer <token>")
.asString();{
"batch": "https://mywebsite.com/hook",
"batchUpdated": "2024-01-11T20:05:18Z",
"feedUpdated": "2024-01-11T18:20:50Z",
"refId": "1c72bd62e59807fdfdc5cc083",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2023-12-06T01:54:08Z",
"social": "https://mywebsite.com/hook",
"socialUpdated": "2023-10-26T03:20:46Z",
"status": "success",
"updated": "2024-01-11T18:20:51Z"
}
{
"webhooks": [
{
"messages": "https://mywebsite.com/hook",
"messagesUpdated": "2024-12-11T09:58:22Z",
"refId": "d0b8bf39805ae442094137f09f2417bf2s82",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2024-02-19T12:17:12Z",
"status": "success",
"updated": "2023-08-22T11:55:06Z"
}
]
}
Webhooks
سرد Webhooks المسجلة
أعد عناوين URL الخاصة بـ webhook المسجلة لحسابك. اضبط allWebhooks على true لعرض webhooks لكل User Profile، بما في ذلك Primary Profile.
GET
/
hook
/
webhook
سرد Webhooks المسجلة
curl --request GET \
--url https://api.ayrshare.com/api/hook/webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ayrshare.com/api/hook/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ayrshare.com/api/hook/webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ayrshare.com/api/hook/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ayrshare.com/api/hook/webhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ayrshare.com/api/hook/webhook")
.header("Authorization", "Bearer <token>")
.asString();{
"batch": "https://mywebsite.com/hook",
"batchUpdated": "2024-01-11T20:05:18Z",
"feedUpdated": "2024-01-11T18:20:50Z",
"refId": "1c72bd62e59807fdfdc5cc083",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2023-12-06T01:54:08Z",
"social": "https://mywebsite.com/hook",
"socialUpdated": "2023-10-26T03:20:46Z",
"status": "success",
"updated": "2024-01-11T18:20:51Z"
}
{
"webhooks": [
{
"messages": "https://mywebsite.com/hook",
"messagesUpdated": "2024-12-11T09:58:22Z",
"refId": "d0b8bf39805ae442094137f09f2417bf2s82",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2024-02-19T12:17:12Z",
"status": "success",
"updated": "2023-08-22T11:55:06Z"
}
]
}
معاملات الرأس
معاملات الاستعلام
إعادة جميع webhooks المسجلة لكل User Profile مرتبط بحسابك، بما في ذلك Primary Profile.
ما عليك سوى توفير API Key الخاص بـ Primary Profile في رأس الطلب.
{
"batch": "https://mywebsite.com/hook",
"batchUpdated": "2024-01-11T20:05:18Z",
"feedUpdated": "2024-01-11T18:20:50Z",
"refId": "1c72bd62e59807fdfdc5cc083",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2023-12-06T01:54:08Z",
"social": "https://mywebsite.com/hook",
"socialUpdated": "2023-10-26T03:20:46Z",
"status": "success",
"updated": "2024-01-11T18:20:51Z"
}
{
"webhooks": [
{
"messages": "https://mywebsite.com/hook",
"messagesUpdated": "2024-12-11T09:58:22Z",
"refId": "d0b8bf39805ae442094137f09f2417bf2s82",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2024-02-19T12:17:12Z",
"status": "success",
"updated": "2023-08-22T11:55:06Z"
}
]
}