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."
}