Webhooks are used to keep track of the state of user data within Registration. Webhooks may be created to send notifications whenever an attribute or plural is created, changed, or deleted. Once configured, Janrain delivers changes in state to a pre-determined URL as a JSON object, with a unique identifier for the transaction. If an error occurs, Janrain will try to send the message three times to avoid temporary networking glitches.
The following information is needed to create a webhook:
The retry system handles network problems and other transient issues. In the event that a webhook call fails, the system will retry the call up to three times. Each retry is delayed by a few seconds.
When a failure happens, the event is logged.
Messages are returned in the body of POST requests as JSON blocks. Each message consists of a unique identifier, a dateTime stamp recording when the event took place, what schema was used, and a hash (which you can use as a simple form of identification). To double-check that a message originated with Janrain, compare the hash value with the hash established when you first configured the webhook.
When an action triggers the webhook, Janrain sends a list of JSON objects to the URL defined in the configuration. You will need to implement code to process the information delivered to this location.
The following is an example message: