---
title: "select_trial_accounts"
canonical_url: "https://tweetstream.io/zh-cn/docs/api/agent-action-select-trial-accounts"
last_updated: 2026-11-05
---

# select_trial_accounts

试用期间，选择试用要推送哪些已保存的 X 账号。read 级：只需 API key。同名 MCP 工具需要 tweetstream:watchlist 权限范围。

Canonical URL: https://tweetstream.io/zh-cn/docs/api/agent-action-select-trial-accounts

## `POST /api/agent/actions/select_trial_accounts`

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

## 授权

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

## 请求体

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `twitterUserIds` | `string[]`, 必填 | The `twitterUserId`s (get_accounts, family BASE) the trial streams. |

### 请求体示例

```json
{
  "twitterUserIds": [
    "1189745302"
  ]
}
```

## 响应字段

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `outcome` | `enum<string>`, 必填 |  |
| `twitterUserIds` | `string[]`, 必填 |  |

## 响应

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

### 200

```json
{
  "outcome": "applied",
  "twitterUserIds": [
    "<string>"
  ]
}
```

### 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/select_trial_accounts \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "twitterUserIds": [
    "1189745302"
  ]
}'
```

### JavaScript

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

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

### Python

```python
import os
import requests

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

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