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
Konten
Listet die Snapchat-Werbekonten, die Ihr verknüpftes Snapchat-Konto nutzen kann, mit Währung, Zeitzone und Status jedes Kontos.
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."
}
Rufen Sie die Snapchat-Werbekonten ab, über die Sie Snaps bewerben können. Verwenden Sie die
id eines Kontos als accountId in Beitrag bewerben.
- Verknüpfen Sie Snapchat zuerst auf der Seite „Social Accounts”. Die Liste umfasst die Werbekonten aller Snapchat-Organisationen, die Ihr verknüpftes Konto sehen kann.
- Jedes Konto hat seine
idsowiename,currency,timezoneundstatus, sofern Snapchat sie meldet. - Budgets und Ausgaben eines Boosts lauten auf die
currencydes Werbekontos. - Lassen Sie
limitweg, um alle Konten in einer Antwort zu erhalten.
Header-Parameter
Query-Parameter
Die maximale Anzahl an Konten pro Seite, von 1 bis 1.000. Lassen Sie den Parameter weg, um alle Konten zu erhalten.
Wenn die Antwort
meta.pagination.hasMore: true enthält, senden Sie hier ihren Wert meta.pagination.next, um die nächste Seite abzurufen. Senden Sie die anderen Parameter unverändert: Ein next-Wert aus einer anderen Anfrage liefert 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."
}