new_releases 更新: 新機能とサービスの更新については、
リリースノートをご覧ください。
Method: users.batchGet
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ユーザーのリストで RCS 対応の電話番号を取得します。
返されたペイロードには、指定したユーザーが RBM プラットフォームから到達可能な RCS 対応の電話番号のリストが含まれます。エージェントが起動されている携帯通信会社で RCS が有効になっている電話番号のみが返されます。
返されるペイロードには、エージェントの起動ステータスに関係なく、電話番号のリストの潜在的なリーチを見積もるために使用できる値も含まれます。
1 分あたり最大 600 クエリ(QPM)。
HTTP リクエスト
POST https://rcsbusinessmessaging.googleapis.com/v1/users:batchGet
この URL は gRPC Transcoding 構文を使用します。
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
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
エージェントの起動ステータスに関係なく、ランダムに選択されたリストから、すべての携帯通信会社で RCS で接続可能な電話番号の数。この値と totalRandomSampleUserCount の比率から、ユーザーのリストに対する潜在的なリーチを概算できます。
|
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/rcsbusinessmessaging
詳細については、OAuth 2.0 Overview をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\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)."]]