---
title: "get_account"
canonical_url: "https://tweetstream.io/zh-cn/docs/api/agent-action-get-account"
last_updated: 2026-11-05
---

# get_account

读取账号信息：邮箱、名称、条款、推荐码和余额、实时流开通进度，以及 Discord 社区状态和通知设置。除非请求带有近期的邮箱验证码登录，邮箱会被遮盖（j***@example.com）。无法读取的部分为 null，并在 refusals 中列出。read 级：只需 API key。同名 MCP 工具需要 tweetstream:account 权限范围。

Canonical URL: https://tweetstream.io/zh-cn/docs/api/agent-action-get-account

## `POST /api/agent/actions/get_account`

`https://tweetstream.io/api/agent/actions/get_account`

## 授权

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `Authorization` | `string`, 必填 | 使用 TweetStream API 密钥进行 Bearer 认证：`Bearer <key>`。 |

## 请求头

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `X-TweetStream-Setup-Proof` | `string` | 可选。邮箱验证返回的 setupProof；带上后会显示完整的账号邮箱。 |

## 请求体

### 请求体示例

```json
{}
```

## 响应字段

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `discord` | `object`, 必填 |  |
| `discord.billingDms` | `object`, 必填 |  |
| `discord.billingDms.eligible` | `boolean`, 必填 |  |
| `discord.billingDms.enabled` | `boolean`, 必填 |  |
| `discord.community` | `object`, 必填 |  |
| `discord.community.botInstalled` | `boolean`, 必填 |  |
| `discord.community.channelReady` | `boolean`, 必填 |  |
| `discord.community.linked` | `boolean`, 必填 |  |
| `discord.community.membership` | `enum<string>`, 必填 |  |
| `discord.community.multipleLinked` | `boolean`, 必填 |  |
| `discord.community.onboardingRequired` | `boolean`, 必填 |  |
| `discord.community.required` | `boolean`, 必填 | Whether this account is asked to join the TweetStream Discord community. Only a checkout whose status is community_required waits for it. |
| `discord.community.verificationPending` | `boolean`, 必填 |  |
| `discord.community.verified` | `boolean`, 必填 |  |
| `discord.limitAlerts` | `boolean`, 必填 |  |
| `email` | `string`, 必填 |  |
| `name` | `string`, 必填 |  |
| `realtimeSetup` | `object`, 必填 |  |
| `realtimeSetup.standard` | `object`, 必填 |  |
| `realtimeSetup.standard.firstAlertAt` | `string`, 必填 |  |
| `realtimeSetup.standard.lastConnectedAt` | `string`, 必填 |  |
| `realtimeSetup.ultra_speed` | `object`, 必填 |  |
| `realtimeSetup.ultra_speed.firstAlertAt` | `string`, 必填 |  |
| `realtimeSetup.ultra_speed.lastConnectedAt` | `string`, 必填 |  |
| `referral` | `object`, 必填 |  |
| `referral.canRefer` | `boolean`, 必填 |  |
| `referral.code` | `string`, 必填 |  |
| `referral.issuedThisYearCents` | `integer`, 必填 | an integer |
| `referral.nextCreditUseAt` | `string`, 必填 |  |
| `referral.onHold` | `boolean`, 必填 |  |
| `referral.pendingCreditsCents` | `integer`, 必填 | an integer |
| `referral.referrals` | `object[]`, 必填 |  |
| `referral.referrals.amountCents` | `integer`, 必填 | an integer |
| `referral.referrals.createdAt` | `string`, 必填 | a string to be decoded into a Date |
| `referral.referrals.maturesAt` | `string`, 必填 |  |
| `referral.referrals.status` | `enum<string>`, 必填 |  |
| `referral.successfulReferrals` | `integer`, 必填 | an integer |
| `referral.url` | `string`, 必填 |  |
| `refusals` | `object[]`, 必填 |  |
| `refusals.message` | `string`, 必填 |  |
| `refusals.reason` | `enum<string>`, 必填 |  |
| `refusals.section` | `enum<string>`, 必填 |  |
| `terms` | `object`, 必填 |  |
| `terms.acceptedAt` | `string`, 必填 |  |
| `terms.acceptedVersion` | `string`, 必填 |  |
| `terms.currentVersion` | `string`, 必填 |  |
| `terms.needsAcceptance` | `boolean`, 必填 |  |

## 响应

| 状态 | 说明 | 请求头 |
| --- | --- | --- |
| `200` | 成功 |  |
| `400` | 输入不符合该操作的 schema（INVALID_REQUEST） |  |
| `401` | API key 缺失或无效 |  |
| `403` | 请求带有外部 Origin |  |
| `429` | 已达到速率限制（RATE_LIMITED），请在 retryAfterSeconds 秒后重试 |  |
| `503` | 暂时不可用，请稍后重试 |  |

### 200

```json
{
  "discord": {
    "billingDms": {
      "eligible": true,
      "enabled": true
    },
    "community": {
      "botInstalled": false,
      "channelReady": false,
      "linked": true,
      "membership": "member",
      "multipleLinked": false,
      "onboardingRequired": false,
      "required": false,
      "verificationPending": false,
      "verified": true
    },
    "limitAlerts": true
  },
  "email": "person@example.com",
  "name": "Market Desk",
  "realtimeSetup": {
    "standard": {
      "firstAlertAt": "2026-10-29T12:20:41.000Z",
      "lastConnectedAt": "2026-11-05T09:14:03.000Z"
    },
    "ultra_speed": {
      "firstAlertAt": null,
      "lastConnectedAt": null
    }
  },
  "referral": {
    "canRefer": true,
    "code": "MARKETDESK",
    "issuedThisYearCents": 0,
    "nextCreditUseAt": null,
    "onHold": false,
    "pendingCreditsCents": 0,
    "referrals": [],
    "successfulReferrals": 0,
    "url": "https://tweetstream.io/signup?ref=MARKETDESK"
  },
  "refusals": [],
  "terms": {
    "acceptedAt": "2026-10-29T12:02:00.000Z",
    "acceptedVersion": "2026-09-28",
    "currentVersion": "2026-09-28",
    "needsAcceptance": false
  }
}
```

### 400

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 401

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 403

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 429

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 503

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

## 代码示例

### cURL

```bash
curl --request POST \
  --url https://tweetstream.io/api/agent/actions/get_account \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{}'
```

### JavaScript

```javascript
const response = await fetch("https://tweetstream.io/api/agent/actions/get_account", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TWEETSTREAM_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});

console.log(response.status, await response.json());
```

### Python

```python
import os
import requests

response = requests.post(
    "https://tweetstream.io/api/agent/actions/get_account",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}"},
    json={},
)

print(response.status_code, response.json())
```
