new_releases 更新:查看
版本说明,了解新功能和产品动态。
Method: users.batchGet
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
获取用户名单中已启用 RCS 的电话号码。
返回的载荷包含 RBM 平台可供指定用户访问且已启用 RCS 的电话号码的列表。系统只会返回已针对发布代理的运营商启用 RCS 的电话号码。
返回的载荷还包含可用于估算电话号码列表的潜在覆盖面的值,而不考虑代理的发布状态。
每分钟最多 600 次查询 (QPM)。
HTTP 请求
POST https://rcsbusinessmessaging.googleapis.com/v1/users:batchGet
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"users": [
string
],
"agentId": string
} |
字段 |
users[] |
string
用户的电话号码列表(采用 E.164 格式)。
|
agentId |
string
必需。代理的唯一标识符。
|
响应正文
包含 RBM 可达性用户数据的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"reachableUsers": [
string
],
"totalRandomSampleUserCount": integer,
"reachableRandomSampleUserCount": integer
} |
字段 |
reachableUsers[] |
string
RBM 可以联系的用户电话号码列表。仅包含发布代理的运营商的用户。
|
totalRandomSampleUserCount |
integer
从 reachableUsers 中随机选择的电话号码数量。通常,此值约为所请求电话号码总数的 75%。如果请求的电话号码数量少于 500,则此值为 0 。
|
reachableRandomSampleUserCount |
integer
所有运营商均可从随机选择的列表中看到的电话号码数量,无论代理的发布状态如何。此值与 totalRandomSampleUserCount 之间的比率可大致估算某个用户列表的潜在覆盖面。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/rcsbusinessmessaging
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis endpoint retrieves a list of RCS-enabled phone numbers for specified users that are reachable by the RBM platform, limited to carriers where the agent is launched.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a list of \u003ccode\u003ereachableUsers\u003c/code\u003e, indicating which phone numbers are RCS-enabled and accessible via the launched agent's carriers.\u003c/p\u003e\n"],["\u003cp\u003eIt provides \u003ccode\u003etotalRandomSampleUserCount\u003c/code\u003e and \u003ccode\u003ereachableRandomSampleUserCount\u003c/code\u003e to estimate the potential reach of a user list, irrespective of the agent's launch status.\u003c/p\u003e\n"],["\u003cp\u003eThe API endpoint is \u003ccode\u003ePOST https://rcsbusinessmessaging.googleapis.com/v1/users:batchGet\u003c/code\u003e, with a maximum request rate of 600 queries per minute.\u003c/p\u003e\n"],["\u003cp\u003eTo make the call to this endpoint, the request body requires a list of user's phone number in E.164 format, and the agents unique identifier.\u003c/p\u003e\n"]]],[],null,["# Method: users.batchGet\n\nGets the RCS-enabled phone numbers for a list of users.\n\nThe returned payload contains a list of RCS-enabled phone numbers reachable by the RBM platform for the specified users. Only phone numbers that are RCS-enabled for a carrier the agent is launched on will be returned.\n\nThe returned payload also contains values that can be used to estimate the potential reach of a list of phone numbers regardless of the launch status of the agent.\n\nMaximum 600 queries per minute (QPM).\n\n### HTTP request\n\n`POST https://rcsbusinessmessaging.googleapis.com/v1/users:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------|\n| ``` { \"users\": [ string ], \"agentId\": string } ``` |\n\n| Fields ||\n|-----------|--------------------------------------------------------|\n| `users[]` | `string` List of users' phone numbers in E.164 format. |\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Response body\n\nResponse with RBM-reachability user data.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"reachableUsers\": [ string ], \"totalRandomSampleUserCount\": integer, \"reachableRandomSampleUserCount\": integer } ``` |\n\n| Fields ||\n|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `reachableUsers[]` | `string` List of users' phone numbers that RBM can reach. Only includes users on carriers that the agent is launched on. |\n| `totalRandomSampleUserCount` | `integer` Count of phone numbers randomly selected from [reachableUsers](/business-communications/rcs-business-messaging/reference/rest/v1/users/batchGet#body.BatchGetUsersResponse.FIELDS.reachable_users). Typically, this value is \\~75% of the total requested phone numbers. This value is `0` if the count of requested phone numbers is less than 500. |\n| `reachableRandomSampleUserCount` | `integer` Count of phone numbers from the randomly selected list that are RCS-reachable across all carriers, regardless of the agent's launch status. The ratio between this value and [totalRandomSampleUserCount](/business-communications/rcs-business-messaging/reference/rest/v1/users/batchGet#body.BatchGetUsersResponse.FIELDS.total_random_sample_user_count) can approximate the potential reach for a list of users. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/rcsbusinessmessaging`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]