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."
}
Отримайте рекламні акаунти Snapchat, з яких ви можете просувати Snaps. Використовуйте
id акаунта як accountId у Просування допису.
- Спочатку підключіть Snapchat на сторінці «Social Accounts». Список охоплює рекламні акаунти в усіх організаціях Snapchat, які бачить ваш підключений акаунт.
- Кожен акаунт має свій
id, а такожname,currency,timezoneіstatus, якщо Snapchat їх повідомляє. - Бюджети та витрати просування вказуються у
currencyрекламного акаунта. - Не вказуйте
limit, щоб отримати всі акаунти в одній відповіді.
Параметри заголовка
Параметри запиту
Максимальна кількість акаунтів на сторінці, від 1 до 1 000. Не вказуйте, щоб отримати всі акаунти.
Коли відповідь містить
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."
}