Pre-Built Webhook Plugins
Last updated
Last updated
We provide certain prebuilt webhook plugins in the site to help streamline the process. These allow you to easily set up a webhook by simply just configuring the endpoint and what you want to receive. No need to create a totally custom plugin. This is typically the better choice unless you are looking to publish a reusable plugin.
Webhooks can also be sent to tools like Zapier, enabling you to create complex custom automation flows. Or, certain plugins are aliases for receiving specific attestations like WITNESS proofs.
If you do not want to actually set up a full handler, you can also use the Forms plugin which allows you to store and view the requests in-site.
Note: These plugins only support a simple POST request and expect a 200 OK response. If you require more custom logic or reusability, a custom plugin is necessary.
POST Routes: Customizable routes for your needs.
User Details: Optionally select to receive user details, like their address, custom inputs, or connected socials (only identifying information and no authentication tokens or details)
Validation Secret: Customize a validation secret to confirm requests are from BitBadges.
Expected Response: 200 OK within 10 seconds
For non-critical logic, consider returning 200 early and asynchronously process.
The forms plugin is a serverless alternative. Think of this like a request storage bin. We store the requests that would've been sent to the endpoints in the claim state. You can then view them in-site or fetch them from the API when needed.
The request/response flow mirrors that of custom plugins, with the pluginSecret
replaced by the inputted validation secret. For detailed implementation guidance, refer to the respective documentation. The configuration is done in-site.
Setup your plugin handler (see plugin documentation for more information)
Create your claim and configure the webhook as one of the plugins, specifying your endpoint
Test it out to make sure it is working