Webhooks API

Webhook Subscribe

copy-icon
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:

copy-icon
{
"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

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
EventAllowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject
TargetUrlURL where trigger will send data when it invokeModel Class containing Definition of payload for Webhook Subscribe API [Required]

Webhook Subscribed URL

copy-icon
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:

copy-icon
{
"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

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]
eventnoneAllowed 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

copy-icon
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:

copy-icon
{
"IsAllowed" : true
}

API can be used to test a subscribed WebHook.

HTTP Request

Get /api/v2/webHook/test?apikey=&apisecret=

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Webhook Unsubscribe URL

copy-icon
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:

copy-icon
{
"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

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
EventAllowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject
TargetUrlURL where trigger will send data when it invokeModel Class containing Definition of payload for Webhook Subscribe API [Required]