> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 账户

> 列出你关联的 Snapchat 账户可使用的 Snapchat 广告账户，包括各账户的货币、时区和状态。

获取你可用于推广 Snap 的 Snapchat 广告账户。在[推广帖子](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md)中将账户的 `id` 用作 `accountId`。

<ul>
  <li>请先在“Social Accounts”页面关联 Snapchat。该列表涵盖你关联的账户可以看到的所有 Snapchat 组织中的广告账户。</li>
  <li>每个账户都有 `id`；当 Snapchat 提供时，还包括 `name`、`currency`、`timezone` 和 `status`。</li>
  <li>推广的预算和花费以广告账户的 `currency` 计。</li>
  <li>省略 `limit` 可在一个响应中获取所有账户。</li>
</ul>

## 请求头参数

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## 查询参数

**limit** `number`

每页返回的最大账户数，范围为 1 到 1,000。省略则获取所有账户。

**next** `string`

当响应包含 `meta.pagination.hasMore: true` 时，将其 `meta.pagination.next` 值发送到这里以获取下一页。其他参数保持不变：来自其他请求的 `next` 值会返回 `code: 101`。

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/ads/snapchat/accounts
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "adAccounts": [
    {
      "id": "5a0d0000-0000-4000-8000-000000000003",
      "name": "Acme Ads",
      "currency": "USD",
      "timezone": "America/Los_Angeles",
      "status": "ACTIVE"
    }
  ],
  "meta": { "pagination": { "hasMore": false } }
}
```

```json 400: Ad accounts error theme={"system"}
{
  "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."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.