toc Webhooks Pybytes > Integrations > Webhooks

Webhooks

Whenever one of your integrated devices sends a signal to Pybytes, we perform an HTTP request defined by the user. You can use some presets (DEVICE_TOKEN, USER_ID, etc), which will act like placeholders and will be dynamically replaced at the moment of performing the request with the relative content.

Integrate your devices

  1. In the sidebar, click on Integrations, New Integration and then on Webhook

New WebHook integration

  1. Fill in the form specifying the following information: (for this example, you can leave the default settings)

    • The remote URL to which we will send the data, in this example, we will use a custom URL generated on webhook.site, paste Your unique URL in the textbox.
    • An event name
    • The HTTP method
    • The request format. Please note that we will pre-fill some headers whenever you change the format. The pre-filled headers are not modifiable.
    • You can optionally add some more headers and query parameters. There’s also an eased interface for basic HTTP authentication.
  2. We will take care of formatting the body accordingly to the chosen request format. In case you’ve chosen Custom Body, you’ll have to define everything yourself. You’ll also be able to manually insert the presets.

Webhook definition

  1. Once you’re done, you’ll see a preview of the request at the bottom of the page. Remember to choose the devices you want to bind to this service.

  2. If everything’s worked as expected, you should be able to see a summary of your integration, similar to the following:

Creation process result

  1. Setup the selected device to Visualize signals and view the webhook site you generated. If all went correctly, you should see the samples arrive there:

Now you should be able to adjust the settings and forward the data to your own service or app and work with the Pybytes signals

 

Previous Next