curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/ads/reddit/accounts
{
"status": "success",
"adAccounts": [
{ "id": "a2_abc123", "name": "Acme Gardening", "currency": "USD" },
{ "id": "a2_def456", "name": "Acme Europe", "currency": "EUR" }
],
"meta": {
"pagination": { "hasMore": false }
}
}
{
"action": "ads",
"status": "error",
"code": 420,
"message": "Ads permissions missing for this social account. Please unlink the account and relink it in the social account linking page, granting all ads permissions.",
"details": "Relink reddit and grant the ads permissions to use ads on reddit."
}
Reddit Ads
Tài khoản
Liệt kê các tài khoản quảng cáo Reddit mà tài khoản Reddit đã liên kết của bạn có thể dùng, kèm tên và đơn vị tiền tệ của từng tài khoản.
GET
/
ads
/
reddit
/
accounts
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/ads/reddit/accounts
{
"status": "success",
"adAccounts": [
{ "id": "a2_abc123", "name": "Acme Gardening", "currency": "USD" },
{ "id": "a2_def456", "name": "Acme Europe", "currency": "EUR" }
],
"meta": {
"pagination": { "hasMore": false }
}
}
{
"action": "ads",
"status": "error",
"code": 420,
"message": "Ads permissions missing for this social account. Please unlink the account and relink it in the social account linking page, granting all ads permissions.",
"details": "Relink reddit and grant the ads permissions to use ads on reddit."
}
Liệt kê các tài khoản quảng cáo Reddit mà bạn có thể dùng để boost. Gửi
id của một tài khoản làm accountId khi bạn boost một bài đăng.
- Mọi tài khoản quảng cáo của mọi doanh nghiệp Reddit mà liên kết của bạn thấy được đều được trả về trong một trang.
meta.pagination.hasMoreluôn làfalse. currencylà đơn vị tiền tệ của tài khoản. Ngân sách boost và chi tiêu trong Insights đều dùng đơn vị này.namevàcurrencykhông có trong phản hồi khi Reddit không cung cấp.- Hãy liên kết Reddit và cấp các quyền quảng cáo (
adsread,adsedit,adsconversions). Nếu thiếu các quyền này, phản hồi làcode: 420.
Tham số Header
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/ads/reddit/accounts
{
"status": "success",
"adAccounts": [
{ "id": "a2_abc123", "name": "Acme Gardening", "currency": "USD" },
{ "id": "a2_def456", "name": "Acme Europe", "currency": "EUR" }
],
"meta": {
"pagination": { "hasMore": false }
}
}
{
"action": "ads",
"status": "error",
"code": 420,
"message": "Ads permissions missing for this social account. Please unlink the account and relink it in the social account linking page, granting all ads permissions.",
"details": "Relink reddit and grant the ads permissions to use ads on reddit."
}