new_releases 更新:查看
版本資訊瞭解新功能和產品更新。
Method: users.batchGet
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
取得使用者清單,啟用支援 RCS 的電話號碼。
傳回的酬載包含已啟用 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
必要欄位。代理程式的專屬 ID。
|
回應主體
以 RBM 可連性使用者資料做為回應。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"reachableUsers": [
string
],
"totalRandomSampleUserCount": integer,
"reachableRandomSampleUserCount": integer
} |
欄位 |
reachableUsers[] |
string
RBM 可聯絡的使用者電話號碼清單。僅包含已啟用代理程式的電信業者使用者。
|
totalRandomSampleUserCount |
integer
從 reachableUsers 隨機選取的電話號碼數量。一般來說,這個值約佔要求電話號碼總數的 75% 左右。如果要求的電話號碼數量少於 500,這個值會是 0 。
|
reachableRandomSampleUserCount |
integer
從隨機選取清單中,所有電信業者都能連上 RCS 的電話號碼數量 (無論服務專員的啟用狀態為何)。這個值和 totalRandomSampleUserCount 的比率,可以近似於使用者名單的潛在觸及率。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/rcsbusinessmessaging
詳情請參閱 OAuth 2.0 Overview。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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)."]]