Skip to main content
Version: 4.49.0-beta

Webhook

The Webhook component allows you to remotely trigger Xill4 flows using a POST request.

Configuration

Relative Path

The 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.

Return Query Params

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"
}
}

Token

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>

Verification Method

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.

Query Parameter

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.

Header Parameter

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.

Outputs

  • Name: Output

    • Description: Outputs the data from the incoming request and the query parameters if enabled.

    • Example: with return query params disabled:

      {
      "data": "Hello World"
      }
    • Example: with return query params enabled:

      {
      "body": {
      "data": "Hello World"
      },
      "query": {
      "id": "admin"
      }
      }