Webhooks API
Webhook Subscribe
curl -X POST \'https://api.loginradius.com/api/v2/webHook?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "event" : "<event>","targetUrl" : "<targetUrl>" }"
The above command returns JSON structured like this:
{"IsPosted" : true}
API can be used to configure a WebHook on your LoginRadius site. Webhooks also work on subscribe and notification model, subscribe your hook and get a notification. Equivalent to RESThook but these provide security on basis of signature and RESThook work on unique URL. Following are the events that are allowed by LoginRadius to trigger a WebHook service call.
HTTP Request
Post /api/v2/webHook?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Event | Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject | |
TargetUrl | URL where trigger will send data when it invoke | Model Class containing Definition of payload for Webhook Subscribe API [Required] |
Webhook Subscribed URL
curl -X GET \'https://api.loginradius.com/api/v2/webHook?apikey=&apisecret=&event=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"Count" : 0,"data" : [{}]}
This API is used to fatch all the subscribed URLs, for particular event
HTTP Request
Get /api/v2/webHook?apikey=&apisecret=&event=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
event | none | Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject [Required] |
Webhook Test
curl -X GET \'https://api.loginradius.com/api/v2/webHook/test?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"IsAllowed" : true}
API can be used to test a subscribed WebHook.
HTTP Request
Get /api/v2/webHook/test?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Webhook Unsubscribe URL
curl -X DELETE \'https://api.loginradius.com/api/v2/webHook?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "event" : "<event>","targetUrl" : "<targetUrl>" }"
The above command returns JSON structured like this:
{"IsDeleted" : true,"RecordsDeleted" : 0}
API can be used to unsubscribe a WebHook configured on your LoginRadius site.
HTTP Request
Delete /api/v2/webHook?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Event | Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject | |
TargetUrl | URL where trigger will send data when it invoke | Model Class containing Definition of payload for Webhook Subscribe API [Required] |