@pradeep49 I had a look at the app Maik mentioned as I needed this for our implementation.

After installation you get an Script Include "sn_otp_support_uti.OtpSupportUtil" which can be used to create, validate and invalidate and access token for a particular record.

 

Example

// Generates an OTP Code for the current user record which is valid for 10 minutes
// Function returns the GlideRecord of the Access Token (Table: sn_otp_support_util_access_token)
new sn_otp_support_uti.OtpSupportUtil().createAccessToken('sys_user', gs.getUserID(), 10);

// Validates the token until max count (Property: sn_otp_support_util.max_otp_validation_failures)
new sn_otp_support_uti.OtpSupportUtil().isValidAccessToken('sys_user', gs.getUserID(), 'myTokenValue');

 

Unfortunately the API only provides the token generation/validation and some logs. The rest is up to you for the implementation (sending the token, UI for validation etc).