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
账户
列出您关联的 Reddit 账户可以使用的 Reddit 广告账户,包括每个账户的名称和币种。
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."
}
列出您可以用于推广的 Reddit 广告账户。推广帖子时,将账户的
id 作为 accountId 发送。
- 您的关联可以看到的每个 Reddit 企业下的所有广告账户都会在同一页中返回。
meta.pagination.hasMore始终为false。 currency是该账户的币种。推广预算和洞察数据中的花费都使用该币种。- 当 Reddit 未提供
name和currency时,响应中会省略它们。 - 关联 Reddit 并授予广告权限(
adsread、adsedit、adsconversions)。缺少这些权限时会返回code: 420。
请求头参数
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."
}