In Verifik we use webhooks to notify our clients each one of the steps that were made during a project flow, in this guide we will focus on the events related with SmartAccess, what we send, under what circumstances we send the data and examples of a complete response in each case.
To consider:
Type: login_email_validation_created
Occurs when someone with a valid email that you provide in your whitelist, make an OTP request, keep in mind that the event will only occur with emails inside this list, other mails will not trigger this event.
Endpoint that will trigger these events: https://api.verifik.co/v2/email-validations
{
**"type": "login_email_validation_created",**
"object": {
"client": "613375a1eab2fe08527f81e2",
"project": "6266193db77ccc8111730c90",
"projectFlow": "658ed28b0990f300134d7b78",
"status": "sent",
"validationMethod": "verificationCode",
"email": "[[email protected]](<mailto:[email protected]>)",
"emailData": "[Object]",
"expiresAt": "2024-06-03T20:02:03.000Z",
"extraParams": [],
"type": "login",
"redirectUrl": "[<https://verifik.app>](<https://verifik.app/>)",
"requires2FA": false,
"ipAddress": "172.17.0.1",
"_id": "665e1ee3647e09c2e0cf74ce",
"updatedAt": "2024-06-03T19:52:03.861Z",
"createdAt": "2024-06-03T19:52:03.861Z",
"__v": 0
},
"ipAddress": "::ffff:127.0.0.1"
}
Type: login_email_validation_otp_resend
Occurs when someone ask for another OTP while the session of the validation is still active.
{
"_id": "6660cc0fe4b4a2f4eba7a062",
"client": "6158e492dd0767a2b8b3f829",
"project": "665f84855c61587599dc5b08",
"projectFlow": "665f84855c61587599dc5b0c",
"status": "sent",
"validationMethod": "verificationCode",
"email": "[email protected]",
"emailData": {
"firstName": "Nicolas",
"title": "Ejemplo bug 11",
"projectName": "Ejemplo bug 11",
"contactEmail": "",
"logo": "<https://cdn.verifik.co/projects/Ejemplobug11_1717535945780-image.png>"
},
"expiresAt": "2024-06-05T20:48:34.000Z",
"extraParams": [],
"type": "login",
"redirectUrl": "<https://verifik.co>",
"requires2FA": false,
"ipAddress": "4.246.194.90",
"updatedAt": "2024-06-05T20:38:34.417Z",
"createdAt": "2024-06-05T20:35:27.811Z",
"__v": 0
}
Type: login_email_validation_validated
Occurs when someone sends the correct OTP during the validation process.
Endpoint that will trigger these events: https://api.verifik.co/v2/email-validations/validate
{
**"type": "login_email_validation_validated",**
"object": {
"_id": "665e236ee1687449db011e1f",
"client": "613375a1eab2fe08527f81e2",
"project": "6266193db77ccc8111730c90",
"projectFlow": "658ed28b0990f300134d7b78",
"status": "validated",
"validationMethod": "verificationCode",
"email": "[[email protected]](<mailto:[email protected]>)",
"emailData": "[Object]",
"expiresAt": "2024-06-03T20:21:26.000Z",
"extraParams": [],
"type": "login",
"redirectUrl": "[<https://verifik.app>](<https://verifik.app/>)",
"requires2FA": false,
"ipAddress": "172.17.0.1",
"updatedAt": "2024-06-03T20:11:31.007Z",
"createdAt": "2024-06-03T20:11:26.861Z",
"__v": 0
},
"ipAddress": "::ffff:127.0.0.1"
}
Type: login_email_validation_otp_incorect
Occurs when someone sends an incorrect OTP during the validation process.
{
"_id": "6660cc0fe4b4a2f4eba7a062",
"client": "6158e492dd0767a2b8b3f829",
"project": "665f84855c61587599dc5b08",
"projectFlow": "665f84855c61587599dc5b0c",
"status": "sent",
"validationMethod": "verificationCode",
"email": "[email protected]",
"emailData": {
"firstName": "Nicolas",
"title": "Ejemplo bug 11",
"projectName": "Ejemplo bug 11",
"contactEmail": "",
"logo": "<https://cdn.verifik.co/projects/Ejemplobug11_1717535945780-image.png>"
},
"otp": "$2a$10$/KWGsRHi3YLMblSQK6Er7OTEd3QRd0J4FGu3twl1N0ZzMETrUGLzi",
"expiresAt": "2024-06-05T20:45:27.000Z",
"extraParams": [],
"type": "login",
"redirectUrl": "<https://verifik.co>",
"requires2FA": false,
"ipAddress": "4.246.194.90",
"updatedAt": "2024-06-05T20:35:27.811Z",
"createdAt": "2024-06-05T20:35:27.811Z",
"__v": 0
}
Type: login_phone_validation_created
Occurs when someone with a valid phone that you provide in your whitelist, make an OTP request, keep in mind that the event will only occur with phones inside this list, other phones will not trigger this event.
Endpoint that will trigger these events: https://api.verifik.co/v2/phone-validations
{
**"type": "login_phone_validation_created",**
"object": {
"client": "613375a1eab2fe08527f81e2",
"project": "6266193db77ccc8111730c90",
"projectFlow": "658ed28b0990f300134d7b78",
"status": "sent",
"countryCode": "+507",
"phone": "80930931",
"phoneGateway": "whatsapp",
"expiresAt": "2024-06-03T20:25:22.000Z",
"phoneData": "[Object]",
"type": "login",
"redirectUrl": "[<https://verifik.app>](<https://verifik.app/>)",
"requires2FA": false,
"ipAddress": "172.17.0.1",
"language": "en",
"_id": "665e245ae1687449db011eff",
"updatedAt": "2024-06-03T20:15:23.312Z",
"createdAt": "2024-06-03T20:15:23.312Z",
"__v": 0
},
"ipAddress": "::ffff:127.0.0.1"
}
Type: login_phone_validation_resend
Occurs when someone ask for another OTP while the session of the validation is still active.
{
"_id": "6660d0fcf6e7624798b3e757",
"client": "6158e492dd0767a2b8b3f829",
"project": "665f84855c61587599dc5b08",
"projectFlow": "665f84855c61587599dc5b0c",
"status": "sent",
"countryCode": "+57",
"phone": "3208364280",
"phoneGateway": "sms",
"otp": "$2a$10$W3t1JBs1DkUCfagW9WLrxeps4UZURiakwPoIBeL6bsrKaRHzCdt2O",
"expiresAt": "2024-06-05T21:10:15.000Z",
"phoneData": {
"title": "Ejemplo bug 11"
},
"type": "login",
"redirectUrl": "<https://verifik.co>",
"requires2FA": false,
"ipAddress": "4.246.194.90",
"language": "es",
"updatedAt": "2024-06-05T21:00:16.173Z",
"createdAt": "2024-06-05T20:56:29.760Z",
"__v": 0
}
Type: login_phone_validation_validated
Occurs when someone sends the correct OTP during the validation process.
Endpoint that will trigger these events: https://api.verifik.co/v2/phone-validations/validate
{
"**type": "login_phone_validation_validated",**
"object": {
"_id": "665e245ae1687449db011eff",
"client": "613375a1eab2fe08527f81e2",
"project": "6266193db77ccc8111730c90",
"projectFlow": "658ed28b0990f300134d7b78",
"status": "validated",
"countryCode": "+507",
"phone": "80930931",
"phoneGateway": "whatsapp",
"expiresAt": "2024-06-03T20:25:22.000Z",
"phoneData": "[Object]",
"type": "login",
"redirectUrl": "[<https://verifik.app>](<https://verifik.app/>)",
"requires2FA": false,
"ipAddress": "172.17.0.1",
"language": "en",
"updatedAt": "2024-06-03T20:18:48.933Z",
"createdAt": "2024-06-03T20:15:23.312Z",
"__v": 0
},
"ipAddress": "::ffff:127.0.0.1"
}
Type: login_phone_validation_otp_incorect
Occurs when someone sends an incorrect OTP during the validation process.
{
"_id": "6660d0fcf6e7624798b3e757",
"client": "6158e492dd0767a2b8b3f829",
"project": "665f84855c61587599dc5b08",
"projectFlow": "665f84855c61587599dc5b0c",
"status": "sent",
"countryCode": "+57",
"phone": "3208364280",
"phoneGateway": "sms",
"otp": "$2a$10$Sq8gm6.GBcwglJRn6w8nBeGA59Uxxx4E7OaXRYJi6mOwu2nPE5gzi",
"expiresAt": "2024-06-05T21:06:28.000Z",
"phoneData": {
"title": "Ejemplo bug 11"
},
"type": "login",
"redirectUrl": "<https://verifik.co>",
"requires2FA": false,
"ipAddress": "4.246.194.90",
"language": "es",
"updatedAt": "2024-06-05T20:56:29.760Z",
"createdAt": "2024-06-05T20:56:29.760Z",
"__v": 0
}