new_releases 更新:查看
版本資訊瞭解新功能和產品更新。
Method: phones.getCapabilities
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
取得使用者的 RBM 相關功能。
傳回的酬載會指定是否可透過 RBM 聯絡使用者,以及使用者支援哪些 RBM 功能。
錯誤處理:如果無法透過 RBM 聯絡使用者,系統會傳回 404 NOT_FOUND 錯誤。包括多種情況:(1) 使用者的裝置不支援 RCS 或已停用 RCS。(2) 使用者位於行動網路上,但該網路未啟動代理程式,或未啟用 RCS 流量。(3) 未發布的代理程式要求非測試人員的使用者權限。
HTTP 要求
GET https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*}/capabilities
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
name |
string
這個欄位會解析為「phones/{E.164}/capabilities」,其中 {E.164} 是使用者 E.164 格式的電話號碼。舉例來說,如果使用者的美國電話號碼為 +1-222-333-4444,產生的端點就是 https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/capabilities。
|
查詢參數
參數 |
requestId |
string
代理商指派的要求專屬 ID。這必須是 UUID,如 https://tools.ietf.org/html/rfc4122 所定義。如果要求 ID 與代理商先前要求使用的 ID 相符,RBM 平台會忽略新要求。
|
agentId |
string
必要欄位。代理程式的專屬 ID。
|
回應主體
使用者支援的功能清單
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"features": [
enum (Feature )
]
} |
欄位 |
features[] |
enum (Feature )
這部裝置支援的 RBM 功能清單。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/rcsbusinessmessaging
詳情請參閱OAuth 2.0 Overview。
功能
列舉 |
FEATURE_UNSPECIFIED |
不指定。 |
RICHCARD_STANDALONE |
獨立複合式資訊卡。 |
RICHCARD_CAROUSEL |
複合式資訊卡輪轉介面。 |
ACTION_CREATE_CALENDAR_EVENT |
建議建立日曆活動。 |
ACTION_DIAL |
建議撥打電話號碼。 |
ACTION_OPEN_URL |
建議在瀏覽器中開啟網址。 |
ACTION_SHARE_LOCATION |
分享位置資訊的建議動作。 |
ACTION_VIEW_LOCATION |
建議動作:在地圖應用程式中查看地點。 |
ACTION_OPEN_URL_IN_WEBVIEW |
建議在 WebView 中開啟網址的動作。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-28 (世界標準時間)。
[null,null,["上次更新時間:2025-07-28 (世界標準時間)。"],[[["\u003cp\u003eThis API endpoint retrieves the RBM capabilities of a specified user, indicating whether they can be reached via RBM and which features they support.\u003c/p\u003e\n"],["\u003cp\u003eThe request is made using a GET method with the user's phone number in E.164 format as a path parameter and an agent ID and request ID as query parameters.\u003c/p\u003e\n"],["\u003cp\u003eA 404 NOT_FOUND error is returned if the user cannot be reached via RBM, which can be due to the user's device not supporting RCS, the user being on a network where the agent isn't launched, or an unlaunched agent requesting capabilities of a non-tester user.\u003c/p\u003e\n"],["\u003cp\u003eThe response body, if successful, includes a list of supported RBM features, such as rich cards, carousels, and suggested actions like opening URLs or creating calendar events.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this API requires the \u003ccode\u003ehttps://www.googleapis.com/auth/rcsbusinessmessaging\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: phones.getCapabilities\n\nGet the RBM-related capabilities of a user.\n\nThe returned payload specifies whether a user can be reached with RBM and, if so, which RBM features the user supports.\n\nError Handling: a 404 NOT_FOUND error is returned when the user cannot be reached with RBM. This includes multiple scenarios: (1) The user's device does not support RCS or has RCS disabled. (2) The user is on a mobile network where the agent is not launched or where RCS traffic is not enabled. (3) An unlaunched agent requests the capabilities of a user who is not a tester.\n\n### HTTP request\n\n`GET https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*}/capabilities`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` This field resolves to \"phones/{E.164}/capabilities\", where {E.164} is the user's phone number in E.164 format. For example, for a user with the US phone number +1-222-333-4444, the resulting endpoint is \u003chttps://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/capabilities\u003e. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestId` | `string` The unique ID of the request, assigned by the agent. This must be a UUID, as defined in \u003chttps://tools.ietf.org/html/rfc4122\u003e. If the request ID matches an ID that the agent used for a previous request, the RBM platform ignores the new request. |\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nList of supported features by the user\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"features\": [ enum (/business-communications/rcs-business-messaging/reference/rest/v1/phones/getCapabilities#Feature) ] } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `features[]` | `enum (`[Feature](/business-communications/rcs-business-messaging/reference/rest/v1/phones/getCapabilities#Feature)`)` List of RBM features that this device supports. |\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).\n\nFeature\n-------\n\nTypes of RBM features that the user supports.\n\n| Enums ||\n|--------------------------------|---------------------------------------------------|\n| `FEATURE_UNSPECIFIED` | Not specified. |\n| `RICHCARD_STANDALONE` | Standalone rich cards. |\n| `RICHCARD_CAROUSEL` | Carousel of rich cards. |\n| `ACTION_CREATE_CALENDAR_EVENT` | Suggested action to create a calendar event. |\n| `ACTION_DIAL` | Suggested action to dial a number. |\n| `ACTION_OPEN_URL` | Suggested action to open a URL in browser. |\n| `ACTION_SHARE_LOCATION` | Suggested action to share a location. |\n| `ACTION_VIEW_LOCATION` | Suggested action to view a location in a map app. |\n| `ACTION_OPEN_URL_IN_WEBVIEW` | Suggested action to open a URL in webview. |"]]