Webhook
The Webhook component allows you to remotely trigger Xill4 flows using a POST request.
Configuration
Configuration
Relative PathThe relative path used for sending data through this webhook component.
Example: /webhook1
In this example the full path to send requests to would be http://localhost:8000/webhook1
when running Xill4 locally with localhost.
Enabling this will return the query parameters of the request in the output.
Example: http://localhost:8000/webhook1?id=admin
will return
{
"body": // Data from the request,
"query": {
"id": "admin"
}
}
The security token that needs to be used to authorize incoming requests. This token must be 40 characters long.
When making a request to the webhook, the token should be present in the authorization header of the request as a Bearer token, or as a query parameter.
Example request with the token in the header using curl: curl --data "hello world" http://localhost:8000/path -H "Authorization: Bearer <YourToken>"
Example request with the token as a query parameter using curl: curl --data "hello world" http://localhost:8000/path?token=<YourToken>
The method used to verify the incoming request. The options are query
and header
.
If the verification method is set to query
, the token must be present as a query parameter in the request. If the verification method is set to header
, the token must be present in the authorization header of the request as a Bearer token.
The name of the query parameter that contains the token. This is only used when the verification method is set to query
. Default value: state
.
The name of the header parameter that contains the token. This is only used when the verification method is set to header
. Default value: Authorization
.
Inputs | Outputs
Example: with return query params disabled:
{
"data": "Hello World"
}
Example: with return query params enabled:
{
"body": {
"data": "Hello World"
},
"query": {
"id": "admin"
}
}