curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/ads/snapchat/accounts
{
"status": "success",
"adAccounts": [
{
"id": "5a0d0000-0000-4000-8000-000000000003",
"name": "Acme Ads",
"currency": "USD",
"timezone": "America/Los_Angeles",
"status": "ACTIVE"
}
],
"meta": { "pagination": { "hasMore": false } }
}
{
"action": "get ad accounts",
"status": "error",
"code": 366,
"message": "Error getting ad accounts. Please verify you have an active Snapchat ad account and have granted permission to access it. Try unlinking and relinking the platform, then try again. Contact us if the issue persists."
}
Snapchat Ads
帳戶
列出你連結的 Snapchat 帳戶可使用的 Snapchat 廣告帳戶,包括各帳戶的貨幣、時區和狀態。
GET
/
ads
/
snapchat
/
accounts
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/ads/snapchat/accounts
{
"status": "success",
"adAccounts": [
{
"id": "5a0d0000-0000-4000-8000-000000000003",
"name": "Acme Ads",
"currency": "USD",
"timezone": "America/Los_Angeles",
"status": "ACTIVE"
}
],
"meta": { "pagination": { "hasMore": false } }
}
{
"action": "get ad accounts",
"status": "error",
"code": 366,
"message": "Error getting ad accounts. Please verify you have an active Snapchat ad account and have granted permission to access it. Try unlinking and relinking the platform, then try again. Contact us if the issue persists."
}
取得你可用於推廣 Snap 的 Snapchat 廣告帳戶。在推廣貼文中將帳戶的
id 用作 accountId。
- 請先在「Social Accounts」頁面連結 Snapchat。此清單涵蓋你連結的帳戶可以看到的所有 Snapchat 組織中的廣告帳戶。
- 每個帳戶都有
id;當 Snapchat 提供時,還包括name、currency、timezone和status。 - 推廣的預算和花費以廣告帳戶的
currency計。 - 省略
limit可在一個回應中取得所有帳戶。
請求頭參數
查詢參數
當回應包含
meta.pagination.hasMore: true 時,將其 meta.pagination.next 值傳送到這裡以取得下一頁。其他參數保持不變:來自其他請求的 next 值會回傳 code: 101。curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/ads/snapchat/accounts
{
"status": "success",
"adAccounts": [
{
"id": "5a0d0000-0000-4000-8000-000000000003",
"name": "Acme Ads",
"currency": "USD",
"timezone": "America/Los_Angeles",
"status": "ACTIVE"
}
],
"meta": { "pagination": { "hasMore": false } }
}
{
"action": "get ad accounts",
"status": "error",
"code": 366,
"message": "Error getting ad accounts. Please verify you have an active Snapchat ad account and have granted permission to access it. Try unlinking and relinking the platform, then try again. Contact us if the issue persists."
}