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
Tài khoản
Liệt kê các tài khoản quảng cáo Snapchat mà tài khoản Snapchat đã liên kết của bạn có thể dùng, kèm tiền tệ, múi giờ và trạng thái của từng tài khoản.
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."
}
Lấy các tài khoản quảng cáo Snapchat mà bạn có thể dùng để boost Snap. Dùng
id của tài khoản làm accountId trong Boost Bài đăng.
- Trước tiên hãy liên kết Snapchat từ trang “Social Accounts”. Danh sách bao gồm các tài khoản quảng cáo trong mọi tổ chức Snapchat mà tài khoản đã liên kết của bạn có thể thấy.
- Mỗi tài khoản có
id, cùngname,currency,timezonevàstatuskhi Snapchat cung cấp. - Ngân sách và chi tiêu của một lượt boost tính theo
currencycủa tài khoản quảng cáo. - Bỏ qua
limitđể nhận mọi tài khoản trong một phản hồi.
Tham số Header
Tham số truy vấn
Khi phản hồi có
meta.pagination.hasMore: true, gửi giá trị meta.pagination.next của nó vào đây để lấy trang tiếp theo. Giữ nguyên các tham số khác: giá trị next từ một yêu cầu khác sẽ trả về 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."
}