جلب جميع المستخدمين دفعةً واحدة
curl --request GET \
--url https://api.ayrshare.com/api/user/batch \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ayrshare.com/api/user/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ayrshare.com/api/user/batch"
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/user/batch",
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/user/batch"
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/user/batch")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true,
"url": "https://storage.googleapis.com/batch.ayrshare.com/users/9iskiedwtOddd/users-batch-2024-01-11-22-42.json",
"urlAvailable": "2024-01-11T22:47:36Z",
"urlExpires": "2024-01-18T22:42:36Z",
"lastUpdated": "2024-01-11T22:42:36.808Z",
"nextUpdate": "2024-01-11T22:54:36.808Z"
}
{
"action": "authorization",
"status": "error",
"code": 102,
"message": "API Key not valid. Please be sure to send a Header Authorization containing 'Bearer API_KEY'. .../ayrshare.com/rest-api/overview#authorization"
}
User
جلب جميع المستخدمين دفعةً واحدة
استرجاع بيانات جميع ملفات تعريف المستخدمين
GET
/
user
/
batch
جلب جميع المستخدمين دفعةً واحدة
curl --request GET \
--url https://api.ayrshare.com/api/user/batch \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ayrshare.com/api/user/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ayrshare.com/api/user/batch"
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/user/batch",
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/user/batch"
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/user/batch")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true,
"url": "https://storage.googleapis.com/batch.ayrshare.com/users/9iskiedwtOddd/users-batch-2024-01-11-22-42.json",
"urlAvailable": "2024-01-11T22:47:36Z",
"urlExpires": "2024-01-18T22:42:36Z",
"lastUpdated": "2024-01-11T22:42:36.808Z",
"nextUpdate": "2024-01-11T22:54:36.808Z"
}
{
"action": "authorization",
"status": "error",
"code": 102,
"message": "API Key not valid. Please be sure to send a Header Authorization containing 'Bearer API_KEY'. .../ayrshare.com/rest-api/overview#authorization"
}
استرجع بيانات جميع ملفات تعريف المستخدمين. استخدم نقطة الجلب الدفعي كبديل عن استدعاء نقطة النهاية /user لكل مستخدم على حِدة بشكل متتابع سريع، والذي قد يخضع لحدود المعدل.
ستُعيد نقطة النهاية رابطًا مُوقَّعًا مسبقًا للملف الذي يحتوي على بيانات جميع ملفات تعريف المستخدمين. يُرجى ملاحظة وقت الحقل
urlAvailable الذي يشير إلى متى يصبح الملف متاحًا.
ينتهي الرابط المُوقَّع مسبقًا بعد 7 أيام من إنشائه. ويمكن توليد ملف جديد كل 3 ساعات.
يمكن أيضًا إشعارك عند جاهزية الملف عبر ويب-هوك إجراءات الدُّفعات.
معاملات الترويسة
{
"success": true,
"url": "https://storage.googleapis.com/batch.ayrshare.com/users/9iskiedwtOddd/users-batch-2024-01-11-22-42.json",
"urlAvailable": "2024-01-11T22:47:36Z",
"urlExpires": "2024-01-18T22:42:36Z",
"lastUpdated": "2024-01-11T22:42:36.808Z",
"nextUpdate": "2024-01-11T22:54:36.808Z"
}
{
"action": "authorization",
"status": "error",
"code": 102,
"message": "API Key not valid. Please be sure to send a Header Authorization containing 'Bearer API_KEY'. .../ayrshare.com/rest-api/overview#authorization"
}
⌘I
