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
必需。代理的唯一标识符。
|
响应正文
用户支持的功能列表
如果成功,响应正文将包含结构如下的数据:
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 中打开网址的操作。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-28。
[null,null,["最后更新时间 (UTC):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. |"]]