new_releases Updates: Check the
release notes for new features and product updates.
Method: phones.dialogflowMessages.create
Stay organized with collections
Save and categorize content based on your preferences.
Prompts a Dialogflow agent to send messages through an RBM agent.
If Dialogflow integration isn't enabled for an RBM agent, this method returns 403 PERMISSION_DENIED
.
When an RBM agent is integrated with a Dialogflow agent, this method triggers an event in the Dialogflow agent. The RBM Platform routes responses from Dialogflow to the user's device and routes messages from the user back to the Dialogflow agent.
If a Dialogflow intent defines multiple responses, the RBM Platform sends users one message per defined response.
If you contact a webhook with Dialogflow fulfillment, the fulfillment request includes the following information in the payload:
Field | Description |
rbm_user_phone_number
| The user's phone number. |
rbm_share_location_response
| The user's location, if they tapped the share location suggested action. |
HTTP request
POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/dialogflowMessages
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
"phones/{E.164}", where {E.164} is the user's phone number
|
Query parameters
Parameters |
messageIdPrefix |
string
A unique prefix of RBM message IDs that result from the Dialogflow event. Dialogflow supports multiple responses for a given event. If an event triggers multiple responses, RBM forwards each response as a separate message. Each message ID shares the same prefix.
|
agentId |
string
Required. The agent's unique identifier.
|
Request body
The request body contains an instance of DialogflowEvent
.
Response body
If successful, the response body contains a newly created instance of DialogflowEvent
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/rcsbusinessmessaging
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-27 UTC.
[null,null,["Last updated 2025-04-27 UTC."],[[["\u003cp\u003eThis API method allows a Dialogflow agent to send messages through an RBM agent, requiring Dialogflow integration to be enabled for the RBM agent.\u003c/p\u003e\n"],["\u003cp\u003eWhen triggered, this method initiates an event in the integrated Dialogflow agent, routing responses from Dialogflow to the user and messages from the user back to Dialogflow.\u003c/p\u003e\n"],["\u003cp\u003eIf a Dialogflow intent has multiple responses, the RBM platform will send each response as a separate message to the user.\u003c/p\u003e\n"],["\u003cp\u003eWebhook fulfillment requests from Dialogflow will include the user's phone number and, if provided, their shared location in the payload.\u003c/p\u003e\n"],["\u003cp\u003eThe API request requires specific parameters, including the user's phone number in E.164 format and a unique prefix for RBM message IDs, and requires the \u003ccode\u003ehttps://www.googleapis.com/auth/rcsbusinessmessaging\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: phones.dialogflowMessages.create\n\nPrompts a [Dialogflow](https://dialogflow.com) agent to send messages through an RBM agent.\n\nIf Dialogflow integration isn't enabled for an RBM agent, this method returns `403 PERMISSION_DENIED`.\n\nWhen an RBM agent is integrated with a Dialogflow agent, this method triggers an [event](https://dialogflow.com/docs/events) in the Dialogflow agent. The RBM Platform routes responses from Dialogflow to the user's device and routes messages from the user back to the Dialogflow agent.\n\nIf a Dialogflow [intent](https://dialogflow.com/docs/intents) defines multiple responses, the RBM Platform sends users one message per defined response.\n\nIf you contact a webhook with Dialogflow [fulfillment](https://dialogflow.com/docs/fulfillment), the fulfillment request includes the following information in the payload:\n\n\u003cbr /\u003e\n\n| Field | Description |\n|---------------------------------------------|--------------------------------------------------------------------------|\n| \u003cbr /\u003e `rbm_user_phone_number` \u003cbr /\u003e | The user's phone number. |\n| \u003cbr /\u003e `rbm_share_location_response` \u003cbr /\u003e | The user's location, if they tapped the share location suggested action. |\n\n\u003cbr /\u003e\n\n### HTTP request\n\n`POST https://rcsbusinessmessaging.googleapis.com/v1/{parent=phones/*}/dialogflowMessages`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------|\n| `parent` | `string` \"phones/{E.164}\", where {E.164} is the user's phone number |\n\n### Query parameters\n\n| Parameters ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `messageIdPrefix` | `string` A unique prefix of RBM message IDs that result from the Dialogflow event. Dialogflow supports multiple responses for a given event. If an event triggers multiple responses, RBM forwards each response as a separate message. Each message ID shares the same prefix. |\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Request body\n\nThe request body contains an instance of [DialogflowEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.dialogflowMessages#DialogflowEvent).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [DialogflowEvent](/business-communications/rcs-business-messaging/reference/rest/v1/phones.dialogflowMessages#DialogflowEvent).\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)."]]