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