Resource: Webhook
Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
JSON representation |
---|
{ "name": string, "displayName": string, "timeout": string, "disabled": boolean, // Union field |
Fields | |
---|---|
name |
The unique identifier of the webhook. Required for the |
displayName |
Required. The human-readable name of the webhook, unique within the agent. |
timeout |
Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds. A duration in seconds with up to nine fractional digits, terminated by ' |
disabled |
Indicates whether the webhook is disabled. |
Union field webhook . Required. The webhook configuration. webhook can be only one of the following: |
|
genericWebService |
Configuration for a generic web service. |
serviceDirectory |
Configuration for a Service Directory service. |
GenericWebService
Represents configuration for a generic web service.
JSON representation |
---|
{ "uri": string, "username": string, "password": string, "requestHeaders": { string: string, ... }, "allowedCaCerts": [ string ] } |
Fields | |
---|---|
uri |
Required. The webhook URI for receiving POST requests. It must use https protocol. |
username |
The user name for HTTP Basic authentication. |
password |
The password for HTTP Basic authentication. |
requestHeaders |
The HTTP request headers to send together with webhook requests. An object containing a list of |
allowedCaCerts[] |
Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command,
A base64-encoded string. |
ServiceDirectoryConfig
Represents configuration for a Service Directory service.
JSON representation |
---|
{
"service": string,
"genericWebService": {
object ( |
Fields | |
---|---|
service |
Required. The name of Service Directory service. Format: |
genericWebService |
Generic Service configuration of this webhook. |
Methods |
|
---|---|
|
Creates a webhook in the specified agent. |
|
Deletes the specified webhook. |
|
Retrieves the specified webhook. |
|
Returns the list of all webhooks in the specified agent. |
|
Updates the specified webhook. |