new_releases 更新:查看
版本資訊瞭解新功能和產品更新。
CapabilityCallbackResponse
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用者的 RBM 功能。這項回應是代理程式發出的 capability.requestCapabilityCallback 要求結果。
代理程式透過 Google Pub/Sub 訂閱收到的「message」物件,「data」欄位中會顯示 CapabilityCallbackResponse。「data」欄位是 Base64 編碼的字串,代理程式必須解碼才能符合 CapabilityCallbackResponse 結構。已淘汰:不再使用。
JSON 表示法 |
{
"requestId": string,
"phoneNumber": string,
"rbmEnabled": boolean,
"features": [
enum (Feature )
],
"status": {
object (Status )
}
} |
欄位 |
requestId |
string
代理程式指派給 capability.requestCapabilityCallback 要求的 UUID。
|
phoneNumber |
string
使用者電話號碼,格式為 E.164。
|
rbmEnabled |
boolean
使用者是否能與服務專員進行 RBM 對話。
|
features[] |
enum (Feature )
這組電話號碼支援的所有 RBM 功能清單
|
status |
object (Status )
回應狀態。如果功能檢查失敗,則會包含錯誤訊息。
|
狀態
Status
類型會定義適用於不同程式設計環境 (包含 REST API 和遠端程序呼叫 (RPC) API) 的邏輯錯誤模型。gRPC 會使用這個模型。每個 Status
訊息包含三部分的資料:錯誤代碼、錯誤訊息和錯誤詳細資料。
如要進一步瞭解這個錯誤模型,以及如何使用這個錯誤模型,請參閱 API 設計指南。
JSON 表示法 |
{
"code": integer,
"message": string,
"details": [
{
"@type": string,
field1: ...,
...
}
]
} |
欄位 |
code |
integer
狀態碼,應為 google.rpc.Code 的列舉值。
|
message |
string
向開發人員顯示的錯誤訊息,應以英文呈現。所有向使用者顯示的錯誤訊息都應經過本地化,並透過 google.rpc.Status.details 欄位傳送,或是由用戶端加以本地化。
|
details[] |
object
附有錯誤詳細資料的訊息清單。這是供 API 使用的一組常用訊息類型。 包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" } 。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eThe CapabilityCallbackResponse indicates a user's RBM capability and is received by agents via a Pub/Sub subscription, base64-encoded in the "data" field of the message object.\u003c/p\u003e\n"],["\u003cp\u003eThis response includes details such as the \u003ccode\u003erequestId\u003c/code\u003e, \u003ccode\u003ephoneNumber\u003c/code\u003e, \u003ccode\u003erbmEnabled\u003c/code\u003e status, and a list of \u003ccode\u003efeatures\u003c/code\u003e supported by the phone number.\u003c/p\u003e\n"],["\u003cp\u003eThe response also contains a \u003ccode\u003estatus\u003c/code\u003e object, which details the response status, and includes error messages if the capability check failed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e object adheres to the gRPC logical error model, containing an error \u003ccode\u003ecode\u003c/code\u003e, an error \u003ccode\u003emessage\u003c/code\u003e, and an array of error \u003ccode\u003edetails\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe error details can contain a type identification and specific fields, as well as the actual error messages.\u003c/p\u003e\n"]]],[],null,["# CapabilityCallbackResponse\n\n| This item is deprecated!\nThe RBM capability of a user. This response is the result of a capability.requestCapabilityCallback request from the agent.\n\nThe CapabilityCallbackResponse appears in the \"data\" field of the \"message\" object that the agent receives from its Google Pub/Sub subscription. The \"data\" field is a base64-encoded string that the agent must decode to match the CapabilityCallbackResponse structure. Deprecated: No longer used.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestId\": string, \"phoneNumber\": string, \"rbmEnabled\": boolean, \"features\": [ enum (/business-communications/rcs-business-messaging/reference/rest/v1/phones/getCapabilities#Feature) ], \"status\": { object (/business-communications/rcs-business-messaging/reference/rest/v1/CapabilityCallbackResponse#Status) } } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestId` | `string` The UUID assigned by the agent to the capability.requestCapabilityCallback request. |\n| `phoneNumber` | `string` Phone number of the user in E.164 format. |\n| `rbmEnabled` | `boolean` Whether the user is capable of participating in RBM conversations with agents. |\n| `features[]` | `enum (`[Feature](/business-communications/rcs-business-messaging/reference/rest/v1/phones/getCapabilities#Feature)`)` List of all RBM features which are supported for this phone number |\n| `status` | `object (`[Status](/business-communications/rcs-business-messaging/reference/rest/v1/CapabilityCallbackResponse#Status)`)` Status of the response. If the capability check fails, includes error messages. |\n\nStatus\n------\n\nThe `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------|\n| ``` { \"code\": integer, \"message\": string, \"details\": [ { \"@type\": string, field1: ..., ... } ] } ``` |\n\n| Fields ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `integer` The status code, which should be an enum value of `google.rpc.Code`. |\n| `message` | `string` A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details](/business-communications/rcs-business-messaging/reference/rest/v1/CapabilityCallbackResponse#Status.FIELDS.details) field, or localized by the client. |\n| `details[]` | `object` A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field `\"@type\"` contains a URI identifying the type. Example: `{ \"id\": 1234, \"@type\": \"types.example.com/standard/id\" }`. |"]]