Webhooks are used to get real time guaranteed messages of ecosystem events such as state finalization, transfers, marketplace sales, and more from the platform.
First, register the webhook.
// Define the webhook const webhook = { "url": "http://url.com/webhook", "authorizationHeaderName": "Authorization", "authorizationKey": "Bearer jwt" } // Register the webhook const response = await fetch('/v1/webhook', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify(webhook), }); const data = await response.json();
Now, events from the platform will be received.
Last updated 3 months ago