Webhook is a new HTTP-based callback function in iSpring Learn that allows you to receive event notifications in the format of a POST request. You no longer need to send API requests or poll the server. The server will automatically send the relevant payload to your webhook URL when the specified event occurs. You can simply track the changes.Â
To set up the webhook, you need to subscribe to the events and have a service that will process notifications.
Events are sent sequentially as a list. The list includes only consecutive events of the same type. If there is an event of a different type, the sequence will be interrupted and a new sequence will start.
The service will return the 200 code. Other codes are considered a failure and the resending process will be started.
If the sending events fails, the service will try to resend them. This takes one day. While waiting for a new attempt, events that have occurred earlier will continue to accumulate. If the retry is successful, all events that accumulated during the time when the subscriber's service was unavailable will be sent in a row.
If messages were not delivered within a day, then the confirmation status of the callbackURL will change to unconfirmed. The status needs to be confirmed again. All events that accumulated during the attempts will be lost.
Webhooks signs requests to verify the sources of messages. For this, the secret setting is used. If the setting has been added, then every request sent by the webhook will have an X-Hub-Signature header.
This is formed in the following way: the body of the sent request is concatenated with the secret setting and then the resulting string is hashed using the SHA-256 algorithm. This hash is the content of the header.
| Only the owner and account administrator can send requests. |